This research examines the shift of consumers from offline shopping to online shopping through e-commerce platforms, driven by convenience, product variety, discounts, and rapid technological advancements such as the internet, smartphones, big data, and machine learning. The study utilizes a transactional dataset containing attributes such as InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, and Country to perform customer segmentation. The segmentation process is conducted using the K-means clustering algorithm combined with the RFM (Recency, Frequency, Monetary) model to develop comprehensive customer profiles. This approach aims to identify distinct customer groups and support the creation of more targeted and personalized marketing strategies. The quality of clustering results is evaluated using the Silhouette Score to ensure optimal grouping performance. The entire data processing, analysis, and modeling are implemented using Python as the primary tool. The research methodology includes literature review, data collection, data preprocessing, clustering model development, customer profile analysis, and evaluation and validation of results. The findings are expected to provide valuable insights into customer behavior, enabling e-commerce businesses to enhance marketing effectiveness, improve customer retention, and attract new customers. Ultimately, this study contributes to the development of data-driven marketing strategies that improve customer satisfaction and business performance in the digital commerce environment.