The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
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 4 new columns ({'cds', 'users_id', 'date', 'amt'}) and 6 missing columns ({'age', 'gender', 'zone', 'age_category', 'state', 'id'}).
This happened while the csv dataset builder was generating data using
hf://datasets/ZennyKenny/CDNOW/purchases.csv (at revision 3400bd38e52a012e691bcddd168504187edbfa55)
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 "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1871, in _prepare_split_single
writer.write_table(table)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 623, in write_table
pa_table = table_cast(pa_table, self._schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2293, in table_cast
return cast_table_to_schema(table, schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2241, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
users_id: int64
date: string
cds: int64
amt: double
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 694
to
{'id': Value(dtype='int64', id=None), 'zone': Value(dtype='string', id=None), 'state': Value(dtype='string', id=None), 'gender': Value(dtype='string', id=None), 'age_category': Value(dtype='string', id=None), 'age': Value(dtype='int64', id=None)}
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 1438, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1050, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 925, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1001, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1742, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1873, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
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 4 new columns ({'cds', 'users_id', 'date', 'amt'}) and 6 missing columns ({'age', 'gender', 'zone', 'age_category', 'state', 'id'}).
This happened while the csv dataset builder was generating data using
hf://datasets/ZennyKenny/CDNOW/purchases.csv (at revision 3400bd38e52a012e691bcddd168504187edbfa55)
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.
id
int64 | zone
string | state
string | gender
string | age_category
string | age
int64 |
|---|---|---|---|---|---|
1
|
Pacific
|
Oregon
|
M
|
young
| 26
|
2
|
Eastern
|
New Jersey
|
M
|
medium
| 36
|
3
|
Central
|
Minnesota
|
M
|
young
| 17
|
4
|
Eastern
|
Michigan
|
M
|
medium
| 56
|
5
|
Eastern
|
New Jersey
|
M
|
medium
| 46
|
6
|
Mountain
|
New Mexico
|
M
|
medium
| 35
|
7
|
Central
|
Nebraska
|
F
| null | 30
|
8
|
Eastern
|
Indiana
|
M
|
young
| 20
|
9
|
Mountain
|
Colorado
|
M
|
medium
| 45
|
10
|
Eastern
|
Ohio
|
F
|
medium
| 40
|
11
|
Eastern
|
New York
|
F
|
medium
| 40
|
12
|
Eastern
|
North Carolina
|
F
|
medium
| 51
|
13
|
Eastern
|
North Carolina
|
M
|
young
| 28
|
14
|
Pacific
|
California
|
F
|
medium
| 55
|
15
|
Central
|
Louisiana
|
M
|
young
| 22
|
16
|
Mountain
|
New Mexico
|
F
| null | 30
|
17
|
Eastern
|
Kentucky
|
F
|
medium
| 37
|
18
|
Central
|
Louisiana
|
F
|
young
| 24
|
19
|
Central
|
Texas
|
M
|
medium
| 53
|
20
|
Eastern
|
Maryland
|
M
|
young
| 17
|
21
|
Central
|
Illinois
|
F
|
medium
| 43
|
22
|
Central
|
Louisiana
|
F
|
medium
| 38
|
23
|
Central
|
North Dakota
|
F
|
young
| 25
|
24
|
Central
|
Illinois
|
M
|
medium
| 37
|
25
|
Central
|
Alabama
|
F
|
young
| 20
|
26
|
Eastern
|
Maryland
|
F
|
medium
| 41
|
27
|
Eastern
|
Florida
|
M
|
medium
| 36
|
28
|
Eastern
|
Massachusetts
|
F
|
young
| 28
|
29
|
Central
|
Texas
|
F
|
medium
| 44
|
30
|
Mountain
|
New Mexico
|
F
|
young
| 21
|
31
|
Mountain
|
Arizona
|
F
|
young
| 21
|
32
|
Eastern
|
Massachusetts
|
M
|
young
| 28
|
33
|
Central
|
Iowa
|
F
|
young
| 29
|
34
|
Eastern
|
New York
|
F
|
medium
| 48
|
35
|
Central
|
Missouri
|
M
|
medium
| 56
|
36
|
Central
|
Oklahoma
|
M
|
medium
| 40
|
37
|
Central
|
Oklahoma
|
F
|
medium
| 46
|
38
|
Eastern
|
Ohio
|
M
|
medium
| 46
|
39
|
Central
|
Alabama
|
F
|
young
| 21
|
40
|
Eastern
|
Pennsylvania
|
F
|
medium
| 57
|
41
|
Eastern
|
North Carolina
|
M
|
medium
| 42
|
42
|
Central
|
Illinois
|
F
|
young
| 19
|
43
|
Eastern
|
Michigan
|
F
|
medium
| 49
|
44
|
Eastern
|
Indiana
|
M
| null | 30
|
45
|
Mountain
|
Arizona
|
F
|
medium
| 34
|
46
|
Mountain
|
Arizona
|
F
|
medium
| 35
|
47
|
Eastern
|
New York
|
M
|
young
| 28
|
48
|
Mountain
|
Colorado
|
M
|
medium
| 34
|
49
|
Mountain
|
Colorado
|
F
| null | 30
|
50
|
Central
|
Illinois
|
M
|
old
| 62
|
51
|
Central
|
Illinois
|
M
| null | 30
|
52
|
Eastern
|
North Carolina
|
M
|
medium
| 39
|
53
|
Central
|
Arkansas
|
M
| null | 30
|
54
|
Pacific
|
Oregon
|
F
|
young
| 25
|
55
|
Central
|
Iowa
|
M
|
medium
| 31
|
56
|
Mountain
|
Arizona
|
F
|
medium
| 40
|
57
|
Mountain
|
Arizona
|
F
|
medium
| 35
|
58
|
Mountain
|
New Mexico
|
M
|
medium
| 56
|
59
|
Central
|
Tennessee
|
F
|
young
| 24
|
60
|
Eastern
|
New Jersey
|
F
|
medium
| 50
|
61
|
Eastern
|
New York
|
M
|
medium
| 53
|
62
|
Central
|
Minnesota
|
M
|
old
| 63
|
63
|
Eastern
|
New York
|
F
|
young
| 24
|
64
|
Central
|
Louisiana
|
F
|
old
| 76
|
65
|
Eastern
|
New Jersey
|
F
|
old
| 67
|
66
|
Pacific
|
Oregon
|
M
|
medium
| 31
|
67
|
Eastern
|
Delaware
|
M
|
medium
| 35
|
68
|
Eastern
|
Florida
|
F
|
young
| 26
|
69
|
Central
|
Tennessee
|
M
|
medium
| 52
|
70
|
Central
|
Wisconsin
|
F
|
medium
| 42
|
71
|
Central
|
Texas
|
M
|
young
| 23
|
72
|
Pacific
|
California
|
F
|
young
| 29
|
73
|
Eastern
|
New Jersey
|
M
|
medium
| 57
|
74
|
Eastern
|
New Jersey
|
F
|
medium
| 41
|
75
|
Pacific
|
California
|
M
|
medium
| 45
|
76
|
Eastern
|
Pennsylvania
|
M
|
young
| 18
|
77
|
Eastern
|
Indiana
|
F
|
medium
| 56
|
78
|
Central
|
Minnesota
|
F
|
medium
| 48
|
79
|
Eastern
|
Michigan
|
F
|
medium
| 34
|
80
|
Mountain
|
Idaho
|
M
|
medium
| 37
|
81
|
Central
|
Texas
|
F
|
old
| 61
|
82
|
Central
|
Missouri
|
F
|
young
| 19
|
83
|
Central
|
Texas
|
F
|
medium
| 44
|
84
|
Eastern
|
New York
|
F
|
young
| 20
|
85
|
Eastern
|
Pennsylvania
|
F
|
medium
| 50
|
86
|
Pacific
|
Nevada
|
F
|
young
| 25
|
87
|
Central
|
Oklahoma
|
M
|
young
| 18
|
88
|
Central
|
Minnesota
|
M
|
medium
| 59
|
89
|
Mountain
|
Colorado
|
M
|
medium
| 38
|
90
|
Central
|
Illinois
|
M
|
medium
| 41
|
91
|
Mountain
|
Colorado
|
M
|
medium
| 36
|
92
|
Eastern
|
Massachusetts
|
M
|
medium
| 46
|
93
|
Mountain
|
Idaho
|
F
|
medium
| 40
|
94
|
Mountain
|
Colorado
|
F
|
medium
| 46
|
95
|
Eastern
|
New York
|
M
|
medium
| 33
|
96
|
Mountain
|
Colorado
|
M
|
medium
| 47
|
97
|
Eastern
|
Pennsylvania
|
F
|
medium
| 50
|
98
|
Eastern
|
Kentucky
|
M
|
medium
| 31
|
99
|
Eastern
|
North Carolina
|
M
|
medium
| 37
|
100
|
Mountain
|
Arizona
|
F
|
young
| 25
|
Dataset Card for CDNOW Dataset
Dataset Summary
The CDNOW dataset is a well-known dataset in customer analytics and predictive modeling, especially used in the context of Customer Lifetime Value (CLV) estimation and Buy Till You Die (BTYD) models. This dataset consists of detailed transaction logs from a CD retailer (CDNOW) for a sample of customers, along with anonymized demographic data.
It is often used in research and teaching materials for modeling purchasing behavior, including techniques like Pareto/NBD, BG/NBD, and Gamma-Gamma models.
Dataset Structure
The dataset is composed of two main CSV files:
purchases.csv
| Column | Description |
|---|---|
| users_id | Unique ID for each customer |
| date | Date of purchase (YYYY-MM-DD format) |
| cds | Number of CDs bought in a single purchase |
| amt | Total dollar amount spent in the purchase |
customers.csv
| Column | Description |
|---|---|
| id | Customer ID (matches users_id in purchases) |
| zone | U.S. sales region |
| state | Customer's state |
| gender | Gender of the customer |
| age_category | Categorical label for customer's age group |
| age | Customer's age in years |
Supported Tasks and Benchmarks
- Customer Segmentation
- Churn Prediction
- CLV Modeling
- RFM Analysis
- Marketing Attribution
This dataset is suitable for supervised and unsupervised learning tasks related to customer behavior analysis.
Languages
Not language-dependent; numeric and categorical data only.
Source Information
The CDNOW dataset was originally made publicly available as part of a research project on CLV modeling by:
Fader, Peter S., and Bruce GS Hardie. "Customer-Base Valuation in a Contractual Setting: The Perils of Ignoring Heterogeneity." Marketing Science 29.1 (2010): 85-93.
It has since been widely used in textbooks and academic courses on marketing analytics, such as:
- "Customer Centricity" by Peter Fader
- "Data Science for Business" by Provost and Fawcett
Citation
If you use this dataset, consider citing the following:
@article{fader2010customer, title={Customer-Base Valuation in a Contractual Setting: The Perils of Ignoring Heterogeneity}, author={Fader, Peter S and Hardie, Bruce GS}, journal={Marketing Science}, volume={29}, number={1}, pages={85--93}, year={2010}, publisher={INFORMS} }
- Downloads last month
- 10