license:osl-3.0 size_categories:10K<n<100K format:csv modality:tabular modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
license: osl-3.0
---
# Purchase Recommendation Dataset

## Overview
This dataset contains synthetic purchase records of 5,000 customers from a tech retail shop over the course of one year (2024). It is designed to support tasks like sequential product recommendation, customer behavior analysis, and predictive modeling for marketing strategies.

### Key Features:
- **Customers**: 5,000 unique customers with randomly generated identifiers.
- **Products**: 100 unique products purchased by customers.
- **Timeframe**: Purchase records span from January 1, 2024, to December 31, 2024.
- **Interactions**: 50,000 purchase records with details on the amount spent per transaction.

## Dataset Details

### Columns:
1. **CustomerName**: The name of the customer (synthetically generated).
2. **ProductName**: The name of the product purchased (e.g., `Product_1`, `Product_2`).
3. **PurchaseDate**: The date of the transaction (YYYY-MM-DD format).
4. **AmountSpent**: The monetary value spent on the transaction (in USD).
5. **CustomerID**: A unique numerical identifier for each customer.
6. **ProductID**: A unique numerical identifier for each product.

### Example Rows:
| CustomerName | ProductName | PurchaseDate | AmountSpent | CustomerID | ProductID |
|--------------|-------------|--------------|-------------|------------|-----------|
| Client_1     | Product_10  | 2024-01-15   | 125.50      | 1          | 10        |
| Client_2     | Product_20  | 2024-02-10   | 89.99       | 2          | 20        |

## Usage

### Applications
This dataset is suitable for:
- **Sequential Recommendations**: Predicting the next product a customer might purchase.
- **Customer Segmentation**: Analyzing purchasing behaviors to group customers based on spending patterns or product preferences.
- **Predictive Analytics**: Building machine learning models for sales forecasting or personalized marketing.

### How to Use
1. **Load the Dataset**:
   ```python
   import pandas as pd

   # Load dataset
   df = pd.read_csv("path/to/demos_retail_cust_purchases.csv")
   ```
2. **Exploration**:
   ```python
   print(df.head())
   print(df.info())
   ```
3. **Sequential Modeling**:
   Create input-output pairs for predicting the next purchase based on historical transactions.

## Dataset Statistics
- **Number of Records**: 50,000
- **Number of Customers**: 5,000
- **Number of Products**: 100
- **Date Range**: January 1, 2024 - December 31, 2024

## Licensing
This dataset is provided under the **Creative Commons Attribution 4.0 International (CC BY 4.0)** license. Users are free to share and adapt the dataset, provided proper attribution is given.

## Citation
If you use this dataset in your research or projects, please cite as:
```
@dataset{purchase_recommendation_2024,
  title={Purchase Recommendation Dataset},
  author={Synthetic Data Generator},
  year={2024},
  url={https://huggingface.co/datasets/your-dataset-name}
}
```

## Acknowledgements
This dataset was synthetically generated using Python libraries like `faker` and `pandas`. Special thanks to the open-source community for providing the tools to generate and share data.

## Contact
For questions or issues, please reach out to [Your Name/Organization] at [Your Email or Contact Info].