Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 1 new columns ({'signup_date'}) and 12 missing columns ({'total_interactions', 'avg_order_value', 'interaction_purchase_ratio', 'monetary', 'last_interaction_days', 'has_purchased', 'engagement_segment', 'engaged_not_purchased', 'purchase_frequency_rate', 'interaction_types_count', 'frequency', 'recency_days'}).

This happened while the csv dataset builder was generating data using

hf://datasets/nibeditans/crros-customer-behavior-dataset/customers.csv (at revision 2f280ad01f00c256f06dd9de89e3a917b4d9008f), ['hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/customer_features.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/customers.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/interactions.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/modeling_dataset.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/products.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/transactions.csv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              customer_id: string
              signup_date: string
              customer_segment: string
              location: string
              acquisition_channel: string
              age: int64
              gender: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1125
              to
              {'customer_id': Value('string'), 'recency_days': Value('int64'), 'frequency': Value('int64'), 'monetary': Value('float64'), 'avg_order_value': Value('float64'), 'total_interactions': Value('int64'), 'last_interaction_days': Value('int64'), 'interaction_types_count': Value('int64'), 'engagement_segment': Value('string'), 'has_purchased': Value('int64'), 'engaged_not_purchased': Value('int64'), 'purchase_frequency_rate': Value('int64'), 'interaction_purchase_ratio': Value('int64'), 'customer_segment': Value('string'), 'location': Value('string'), 'acquisition_channel': Value('string'), 'age': Value('int64'), 'gender': Value('string')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
                  ...<4 lines>...
                  )
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 1 new columns ({'signup_date'}) and 12 missing columns ({'total_interactions', 'avg_order_value', 'interaction_purchase_ratio', 'monetary', 'last_interaction_days', 'has_purchased', 'engagement_segment', 'engaged_not_purchased', 'purchase_frequency_rate', 'interaction_types_count', 'frequency', 'recency_days'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/nibeditans/crros-customer-behavior-dataset/customers.csv (at revision 2f280ad01f00c256f06dd9de89e3a917b4d9008f), ['hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/customer_features.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/customers.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/interactions.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/modeling_dataset.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/products.csv', 'hf://datasets/nibeditans/crros-customer-behavior-dataset@2f280ad01f00c256f06dd9de89e3a917b4d9008f/transactions.csv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

customer_id
string
recency_days
int64
frequency
int64
monetary
float64
avg_order_value
float64
total_interactions
int64
last_interaction_days
int64
interaction_types_count
int64
engagement_segment
string
has_purchased
int64
engaged_not_purchased
int64
purchase_frequency_rate
int64
interaction_purchase_ratio
int64
customer_segment
string
location
string
acquisition_channel
string
age
int64
gender
string
C00001
21
31
482,863.71
15,576.24871
335
7
4
High Engagement
1
0
0
10
medium
Bhubaneswar
ads
25
male
C00002
9
45
820,236.81
18,227.484667
389
4
4
High Engagement
1
0
0
8
high
Hyderabad
referral
47
female
C00003
550
0
0
0
8
517
4
Medium Engagement
0
1
0
0
low
Ahmedabad
organic
46
female
C00004
10
31
537,397.24
17,335.394839
319
9
4
High Engagement
1
0
0
10
medium
Bangalore
organic
38
male
C00005
4
95
1,556,310.1
16,382.211579
752
0
4
High Engagement
1
0
0
7
high
Hyderabad
referral
37
female
C00006
7
17
150,210.71
8,835.924118
99
2
4
High Engagement
1
0
0
5
high
Chennai
ads
29
male
C00007
1
124
2,812,844.88
22,684.232903
824
1
4
High Engagement
1
0
0
6
high
Bhubaneswar
ads
27
female
C00008
3
22
160,599.06
7,299.957273
182
0
4
High Engagement
1
0
0
8
high
Kolkata
ads
31
other
C00009
34
29
591,036.49
20,380.568621
328
4
4
High Engagement
1
0
0
11
medium
Kolkata
ads
19
female
C00010
354
0
0
0
35
122
4
High Engagement
0
1
0
0
low
Jaipur
ads
37
female
C00011
4
76
1,184,279.97
15,582.631184
617
0
4
High Engagement
1
0
0
8
high
Jaipur
referral
35
female
C00012
11
70
1,390,479.04
19,863.986286
539
0
4
High Engagement
1
0
0
7
high
Chennai
ads
25
female
C00013
19
13
319,208.09
24,554.468462
186
1
4
High Engagement
1
0
0
14
medium
Hyderabad
organic
50
female
C00014
733
0
0
0
8
700
4
Medium Engagement
0
1
0
0
low
Kolkata
ads
41
male
C00015
13
14
213,353.44
15,239.531429
189
0
4
High Engagement
1
0
0
13
medium
Mumbai
ads
41
male
C00016
86
28
266,889.03
9,531.751071
276
3
4
High Engagement
1
0
0
9
medium
Mumbai
ads
30
female
C00017
82
6
31,365.09
5,227.515
64
7
4
High Engagement
1
0
0
10
medium
Bangalore
ads
34
male
C00018
51
25
366,317.27
14,652.6908
321
4
4
High Engagement
1
0
0
12
medium
Mumbai
organic
41
female
C00019
3
23
391,763.84
17,033.210435
159
1
4
High Engagement
1
0
0
6
high
Delhi
ads
36
female
C00020
512
0
0
0
14
462
4
Medium Engagement
0
1
0
0
low
Bhubaneswar
ads
51
male
C00021
8
15
143,748.9
9,583.26
220
0
4
High Engagement
1
0
0
14
medium
Chennai
ads
32
male
C00022
4
12
137,487.04
11,457.253333
165
0
4
High Engagement
1
0
0
13
medium
Jaipur
ads
29
female
C00023
400
1
31,537
31,537
9
372
3
Medium Engagement
1
0
0
9
low
Delhi
organic
41
female
C00024
123
10
160,905.78
16,090.578
178
2
4
High Engagement
1
0
0
17
medium
Ahmedabad
ads
22
male
C00025
2
29
424,884.09
14,651.175517
284
0
4
High Engagement
1
0
0
9
medium
Bhubaneswar
ads
44
female
C00026
41
13
324,082.38
24,929.413846
254
1
4
High Engagement
1
0
0
19
medium
Kolkata
ads
21
female
C00027
1
73
1,515,555.37
20,761.032466
678
0
4
High Engagement
1
0
0
9
high
Bhubaneswar
ads
41
female
C00028
9
44
586,621.18
13,332.299545
336
0
4
High Engagement
1
0
0
7
high
Jaipur
ads
28
female
C00029
3
27
492,976.23
18,258.378889
245
0
4
High Engagement
1
0
0
9
medium
Pune
organic
39
male
C00030
776
1
9,403.02
9,403.02
7
771
2
Medium Engagement
1
0
0
7
low
Pune
ads
44
female
C00031
539
2
17,058.54
8,529.27
13
516
4
Medium Engagement
1
0
0
6
low
Delhi
organic
36
male
C00032
91
13
221,670.56
17,051.581538
114
3
4
High Engagement
1
0
0
8
medium
Hyderabad
ads
23
male
C00033
5
40
737,934.96
18,448.374
332
1
4
High Engagement
1
0
0
8
high
Kolkata
organic
26
male
C00034
0
77
1,800,676.6
23,385.41039
754
0
4
High Engagement
1
0
0
9
high
Jaipur
organic
27
male
C00035
304
1
10,471.8
10,471.8
5
285
2
Medium Engagement
1
0
0
5
low
Jaipur
ads
18
female
C00036
25
6
233,610.14
38,935.023333
74
1
4
High Engagement
1
0
0
12
medium
Jaipur
ads
46
male
C00037
3
19
273,955.34
14,418.702105
174
3
4
High Engagement
1
0
0
9
medium
Mumbai
ads
36
female
C00038
121
0
0
0
3
94
2
Low Engagement
0
1
0
0
low
Jaipur
ads
23
female
C00039
631
0
0
0
18
520
4
High Engagement
0
1
0
0
low
Pune
ads
49
female
C00040
97
2
110,776.2
55,388.1
6
90
3
Medium Engagement
1
0
0
3
low
Ahmedabad
ads
27
female
C00041
6
30
440,150.53
14,671.684333
223
0
4
High Engagement
1
0
0
7
high
Chennai
ads
37
other
C00042
240
1
28,784.46
28,784.46
9
214
4
Medium Engagement
1
0
0
9
low
Bhubaneswar
ads
26
male
C00043
577
0
0
0
7
551
4
Medium Engagement
0
1
0
0
low
Chennai
ads
18
female
C00044
7
12
258,633.59
21,552.799167
165
0
4
High Engagement
1
0
0
13
medium
Pune
ads
21
male
C00045
9
28
605,458.04
21,623.501429
312
0
4
High Engagement
1
0
0
11
medium
Pune
referral
30
female
C00046
68
11
188,727.15
17,157.013636
143
0
4
High Engagement
1
0
0
13
medium
Ahmedabad
organic
43
male
C00047
48
1
2,346
2,346
31
11
4
High Engagement
1
0
0
31
low
Bangalore
referral
38
female
C00048
11
88
1,544,977.27
17,556.559886
781
0
4
High Engagement
1
0
0
8
high
Delhi
organic
36
male
C00049
51
20
395,807.88
19,790.394
292
2
4
High Engagement
1
0
0
14
medium
Mumbai
organic
18
male
C00050
6
72
1,111,319.37
15,434.99125
525
0
4
High Engagement
1
0
0
7
high
Hyderabad
organic
47
female
C00051
401
1
2,452.16
2,452.16
11
396
3
Medium Engagement
1
0
0
11
low
Jaipur
ads
37
female
C00052
3
24
395,532.83
16,480.534583
210
1
4
High Engagement
1
0
0
8
high
Jaipur
organic
33
male
C00053
0
25
455,893.12
18,235.7248
229
0
4
High Engagement
1
0
0
9
medium
Ahmedabad
referral
46
female
C00054
65
26
579,083.88
22,272.456923
374
3
4
High Engagement
1
0
0
14
medium
Bangalore
referral
47
male
C00056
0
11
236,908.06
21,537.096364
193
0
4
High Engagement
1
0
0
17
medium
Mumbai
ads
32
female
C00057
4
22
484,931.98
22,042.362727
254
0
4
High Engagement
1
0
0
11
high
Delhi
referral
24
male
C00058
161
3
143,158.32
47,719.44
84
14
4
High Engagement
1
0
0
28
low
Mumbai
referral
44
male
C00059
8
36
431,284.61
11,980.128056
335
1
4
High Engagement
1
0
0
9
medium
Bangalore
ads
21
male
C00060
423
1
52,852.44
52,852.44
80
0
4
High Engagement
1
0
0
80
low
Pune
ads
54
male
C00061
20
44
914,450.07
20,782.956136
359
0
4
High Engagement
1
0
0
8
high
Mumbai
ads
35
female
C00062
17
16
206,277.2
12,892.325
169
0
4
High Engagement
1
0
0
10
medium
Chennai
ads
24
female
C00063
0
12
191,434.74
15,952.895
131
0
4
High Engagement
1
0
0
10
medium
Mumbai
organic
22
other
C00064
9
83
1,284,198.99
15,472.276988
785
0
4
High Engagement
1
0
0
9
high
Pune
ads
22
male
C00065
14
22
432,169.76
19,644.08
279
0
4
High Engagement
1
0
0
12
medium
Jaipur
organic
36
female
C00066
7
31
653,887.08
21,093.131613
333
0
4
High Engagement
1
0
0
10
medium
Bhubaneswar
organic
34
male
C00067
181
2
21,677.15
10,838.575
15
170
4
High Engagement
1
0
0
7
low
Bhubaneswar
ads
22
female
C00068
20
20
348,920.76
17,446.038
186
4
4
High Engagement
1
0
0
9
medium
Bhubaneswar
referral
31
male
C00069
62
25
350,073.9
14,002.956
374
1
4
High Engagement
1
0
0
14
medium
Jaipur
referral
21
other
C00070
15
17
121,637.65
7,155.155882
210
7
4
High Engagement
1
0
0
12
medium
Ahmedabad
ads
40
male
C00071
255
0
0
0
5
221
3
Medium Engagement
0
1
0
0
low
Delhi
ads
34
female
C00072
41
30
455,282.82
15,176.094
351
2
4
High Engagement
1
0
0
11
medium
Delhi
organic
31
male
C00073
4
13
245,938.97
18,918.382308
155
0
4
High Engagement
1
0
0
11
medium
Jaipur
ads
22
female
C00074
35
4
122,029.76
30,507.44
49
4
4
High Engagement
1
0
0
12
medium
Mumbai
organic
31
female
C00075
3
17
257,564.16
15,150.832941
170
2
4
High Engagement
1
0
0
10
medium
Hyderabad
organic
30
female
C00076
0
5
84,324.5
16,864.9
45
0
4
High Engagement
1
0
0
9
medium
Delhi
ads
38
female
C00077
117
1
2,962.38
2,962.38
32
104
4
High Engagement
1
0
0
32
low
Chennai
organic
36
male
C00078
64
21
340,373.09
16,208.242381
278
4
4
High Engagement
1
0
0
13
medium
Chennai
organic
42
male
C00079
619
0
0
0
6
584
3
Medium Engagement
0
1
0
0
low
Kolkata
referral
30
female
C00080
5
55
1,077,975.23
19,599.549636
500
0
4
High Engagement
1
0
0
9
high
Chennai
organic
18
male
C00081
51
21
250,892.71
11,947.271905
266
3
4
High Engagement
1
0
0
12
medium
Delhi
organic
44
female
C00082
346
1
7,266.24
7,266.24
6
341
3
Medium Engagement
1
0
0
6
low
Hyderabad
organic
25
female
C00083
2
45
759,886.6
16,886.368889
370
0
4
High Engagement
1
0
0
8
high
Pune
organic
23
male
C00085
17
27
485,134.52
17,967.945185
284
2
4
High Engagement
1
0
0
10
medium
Mumbai
ads
38
female
C00086
20
2
28,185.48
14,092.74
19
11
4
High Engagement
1
0
0
9
low
Pune
organic
29
female
C00087
37
14
256,591.84
18,327.988571
233
1
4
High Engagement
1
0
0
16
medium
Hyderabad
referral
29
female
C00088
11
3
223,939.69
74,646.563333
46
1
4
High Engagement
1
0
0
15
medium
Ahmedabad
organic
31
male
C00089
1
10
95,447.35
9,544.735
100
1
4
High Engagement
1
0
0
10
high
Bhubaneswar
ads
49
female
C00090
4
14
212,078.97
15,148.497857
206
0
4
High Engagement
1
0
0
14
medium
Kolkata
ads
34
male
C00091
1
94
1,753,816.24
18,657.619574
789
0
4
High Engagement
1
0
0
8
high
Ahmedabad
ads
25
female
C00092
3
65
1,446,338.05
22,251.354615
614
0
4
High Engagement
1
0
0
9
high
Delhi
ads
25
male
C00093
1
83
1,479,329.36
17,823.245301
620
0
4
High Engagement
1
0
0
7
high
Hyderabad
referral
32
male
C00094
71
15
275,039.41
18,335.960667
216
0
4
High Engagement
1
0
0
14
medium
Bhubaneswar
organic
37
female
C00095
321
1
7,191.36
7,191.36
16
244
4
High Engagement
1
0
0
16
low
Kolkata
ads
39
male
C00096
15
104
2,318,509.1
22,293.356731
797
1
4
High Engagement
1
0
0
7
high
Mumbai
referral
36
other
C00097
5
85
1,639,128.96
19,283.870118
657
0
4
High Engagement
1
0
0
7
high
Mumbai
organic
26
male
C00098
23
24
644,724.02
26,863.500833
376
4
4
High Engagement
1
0
0
15
medium
Jaipur
organic
30
male
C00099
21
86
2,337,964.62
27,185.635116
734
1
4
High Engagement
1
0
0
8
high
Delhi
organic
42
male
C00100
24
34
432,961.88
12,734.172941
289
1
4
High Engagement
1
0
0
8
high
Chennai
ads
23
male
C00101
7
56
721,765.2
12,888.664286
458
2
4
High Engagement
1
0
0
8
high
Hyderabad
organic
30
female
C00102
613
2
32,727.23
16,363.615
38
467
4
High Engagement
1
0
0
19
low
Kolkata
organic
40
female
End of preview.

CRROS Customer Behavior Dataset

This dataset is part of my Customer Retention & Revenue Optimization System (CRROS) project. The goal of the project is to simulate realistic customer behavior and use it to build an end-to-end customer analytics workflow, from raw data all the way to business decisions.

Instead of generating completely random records, the dataset follows business-driven rules that simulate how customers interact with products, make purchases, become inactive over time, and eventually churn. This makes it useful for practicing real-world data science workflows while keeping the data completely synthetic.

What's Included?

The repository contains six CSV files that represent different stages of the project.

File Description
customers.csv Customer profile and demographic information.
products.csv Product catalog used throughout the simulation.
transactions.csv Purchase history generated from simulated customer behavior.
interactions.csv Customer engagement events such as website visits and marketing interactions.
customer_features.csv Customer-level features created through feature engineering.
modeling_dataset.csv Final dataset prepared for machine learning models.

Project Objective

I built CRROS to simulate a complete customer analytics pipeline rather than just training a machine learning model.

The project covers:

  • Customer behavior simulation
  • Data validation and exploration
  • SQL-based feature engineering
  • Exploratory Data Analysis (EDA)
  • Customer churn prediction
  • Purchase probability prediction
  • Customer targeting and business optimization
  • Revenue impact estimation

The idea was to build something that reflects how an end-to-end data science project looks in practice.

How the Dataset Was Created?

The dataset is entirely synthetic, but it wasn't generated randomly. I used NumPy's Random Number Generation tool to design my dataset.

A set of business rules drives customer behavior throughout the simulation. Customers have different value segments, purchasing habits, engagement patterns, and inactivity levels. Those behaviors influence transactions, interactions, and eventually churn.

To make the data more realistic, the simulation also includes:

  • Multiple customer behavior patterns
  • Behavioral relationships between tables
  • Missing values
  • Outliers
  • Natural variation and noise

This creates a dataset that is much closer to what analysts and data scientists work with in real projects.

Suggested Use Cases

This dataset can be used for a variety of data science and machine learning tasks, including:

  • Customer churn prediction
  • Purchase prediction
  • Customer segmentation
  • Feature engineering
  • Exploratory Data Analysis (EDA)
  • SQL practice
  • Machine learning projects
  • Business Intelligence dashboards
  • Portfolio projects
  • Teaching and learning data science concepts

Notes

This is a synthetic dataset created for educational and portfolio purposes. It does not contain any real customer information.

The focus of the project is to demonstrate how realistic business logic can be used to create meaningful datasets for analytics and machine learning workflows.

Resources

If you'd like to see the complete project or learn how the dataset was built, you can explore the following resources:

Thanks for checking out the dataset! I hope it helps you learn something new or build something interesting. If you use it in one of your own projects, I'd love to see what you create.

Downloads last month
45

Models trained or fine-tuned on nibeditans/crros-customer-behavior-dataset