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 23 new columns ({'X21', 'X13', 'X9', 'X4', 'X14', 'X3', 'X8', 'X20', 'X16', 'X15', 'X22', 'X1', 'X23', 'X6', 'X17', 'X12', 'X11', 'X19', 'X7', 'X5', 'X10', 'X2', 'X18'}) and 13 missing columns ({'native-country', 'sex', 'fnlwgt', 'age', 'occupation', 'relationship', 'capital-gain', 'workclass', 'education-num', 'capital-loss', 'race', 'marital-status', 'hours-per-week'}).

This happened while the csv dataset builder was generating data using

hf://datasets/kuldeepbishnoi29/dro-vs-naive-datasets/Tabular/Dataset/Bank_Datasets/seed_1/train/train_alpha_0.1.csv (at revision 7dc75450893369f1b1714e8012f455f0a8454e71)

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.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
                  writer.write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              X1: double
              X2: int64
              X3: double
              X4: double
              X5: double
              X6: double
              X7: double
              X8: double
              X9: double
              X10: double
              X11: double
              X12: double
              X13: double
              X14: double
              X15: double
              X16: double
              X17: double
              X18: double
              X19: double
              X20: double
              X21: double
              X22: double
              X23: double
              Y: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 2801
              to
              {'age': Value('float64'), 'workclass': Value('float64'), 'fnlwgt': Value('float64'), 'education-num': Value('float64'), 'marital-status': Value('float64'), 'occupation': Value('float64'), 'relationship': Value('float64'), 'race': Value('float64'), 'sex': Value('int64'), 'capital-gain': Value('float64'), 'capital-loss': Value('float64'), 'hours-per-week': Value('float64'), 'native-country': Value('float64'), 'Y': Value('int64')}
              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 1339, 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 972, in convert_to_parquet
                  builder.download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
                  self._download_and_prepare(
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, 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 23 new columns ({'X21', 'X13', 'X9', 'X4', 'X14', 'X3', 'X8', 'X20', 'X16', 'X15', 'X22', 'X1', 'X23', 'X6', 'X17', 'X12', 'X11', 'X19', 'X7', 'X5', 'X10', 'X2', 'X18'}) and 13 missing columns ({'native-country', 'sex', 'fnlwgt', 'age', 'occupation', 'relationship', 'capital-gain', 'workclass', 'education-num', 'capital-loss', 'race', 'marital-status', 'hours-per-week'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/kuldeepbishnoi29/dro-vs-naive-datasets/Tabular/Dataset/Bank_Datasets/seed_1/train/train_alpha_0.1.csv (at revision 7dc75450893369f1b1714e8012f455f0a8454e71)
              
              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.

age
float64
workclass
float64
fnlwgt
float64
education-num
float64
marital-status
float64
occupation
float64
relationship
float64
race
float64
sex
int64
capital-gain
float64
capital-loss
float64
hours-per-week
float64
native-country
float64
Y
int64
1.206368
2.918927
1.854136
0.738546
2.28281
-1.239378
0.365601
-0.819999
0
-0.08457
-0.167484
-0.153412
-0.230296
1
0.641471
0.830111
-0.139091
-3.187394
2.28281
0.996323
-0.884823
-4.430651
1
-0.170995
-0.307324
0.796275
-2.202809
0
-0.342492
-0.214298
-0.772773
-2.7948
0.947485
0.002678
0.365601
-3.227101
1
-0.147864
-0.218169
-0.077081
-2.038433
0
-0.115063
-0.214298
2.099193
-0.439236
0.279822
-0.494145
1.616025
-0.819999
1
-0.147864
-0.218169
-0.077081
-1.874057
0
0.003146
0.830111
-0.342534
1.13114
-0.387841
0.251089
-0.259611
-0.819999
1
-0.274983
-0.227614
-0.228977
-3.84657
1
1.855987
-0.214298
0.753539
-0.83183
2.28281
1.244734
1.616025
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
-0.948969
-0.214298
0.251531
-0.439236
1.615148
-0.742556
0.990813
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
-1.100588
-0.214298
2.603429
-0.439236
0.947485
-1.487789
-0.259611
0.383551
1
-0.147864
-0.218169
0.750997
0.262833
0
0.036556
-0.214298
1.586567
-0.439236
0.947485
-0.494145
0.990813
0.383551
1
-0.147864
-0.218169
-2.3957
0.262833
0
1.022081
0.830111
-0.072255
1.916328
-0.387841
0.747912
-0.884823
-0.819999
1
13.317986
-0.218169
1.993115
0.262833
1
0.794653
-0.214298
-0.617341
1.13114
-0.387841
1.244734
-0.884823
0.383551
1
-0.147864
-0.218169
1.579076
0.262833
1
0.514378
2.918927
-1.002873
-1.617018
-1.723167
0.002678
-0.259611
-0.819999
0
-0.093656
-0.323508
1.722471
-5.490331
1
-0.948969
0.830111
0.731489
1.13114
0.947485
-1.487789
-0.259611
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
1.173701
-0.214298
1.538428
-0.046642
-1.723167
-1.487789
-0.259611
0.383551
0
-0.147864
-0.218169
-0.49112
0.262833
0
-0.190873
-0.214298
-0.619663
-0.439236
-1.723167
-1.487789
1.616025
0.383551
0
-0.147864
-0.218169
-0.49112
0.262833
0
-0.756321
-1.258706
0.109753
-2.7948
0.279822
1.741557
1.616025
-0.819999
1
-0.264249
-0.317568
1.517056
-2.531561
0
-0.580214
2.918927
0.039022
-0.046642
-0.387841
0.996323
-0.259611
-0.819999
1
0.040691
-0.013795
-0.259585
-0.065919
1
0.082687
-1.258706
1.007821
2.308922
-1.723167
-1.487789
-0.884823
-2.02355
0
0.01762
-0.306565
-0.203942
-0.559048
1
-0.797349
-0.214298
-0.066056
0.345952
0.947485
1.244734
-0.259611
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
0.643033
-0.214298
-0.291905
-0.83183
-1.723167
0.251089
-0.259611
0.383551
0
-0.147864
-0.218169
0.585382
0.262833
0
0.946272
-0.214298
0.464554
-0.439236
-0.387841
-0.245733
-0.884823
0.383551
1
-0.147864
4.475346
0.088535
0.262833
1
-1.100588
-0.214298
4.399597
-0.439236
0.947485
-0.990967
0.990813
0.383551
1
-0.147864
-0.218169
-0.077081
-4.832826
0
0.339795
-0.214298
-0.01658
-0.046642
-0.387841
0.747912
2.241237
0.383551
0
-0.147864
4.43833
0.750997
0.262833
1
0.112366
-0.214298
0.180052
-0.439236
0.947485
-0.990967
-0.259611
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.72154
-1.258706
-0.077687
1.13114
-1.723167
0.747912
-0.259611
0.383551
1
-0.147864
-0.218169
0.750997
0.262833
0
-1.024778
-0.214298
-0.758942
-0.046642
0.947485
-0.742556
-0.259611
0.383551
0
1.012096
-0.218169
0.336958
0.262833
1
0.946272
-0.214298
0.806029
-0.046642
2.28281
0.251089
1.616025
0.383551
0
-0.147864
-0.218169
-1.319198
0.262833
0
0.718843
-0.214298
0.175426
-0.046642
0.947485
0.251089
1.616025
-2.02355
0
-0.147864
-0.218169
-0.077081
0.262833
0
1.845335
3.963336
0.685201
1.13114
2.28281
-1.239378
1.616025
-2.02355
0
-0.184577
-0.198639
0.008235
0.427209
0
-0.115063
-0.214298
-1.013933
1.13114
-0.387841
-0.742556
-0.884823
0.383551
1
1.875265
-0.218169
-0.077081
0.262833
1
-0.72154
-0.214298
-0.668077
-0.439236
-0.387841
-1.487789
2.241237
0.383551
0
-0.147864
5.158891
-0.077081
0.262833
0
0.491414
1.874519
0.638842
-0.046642
-0.387841
1.244734
-0.884823
0.383551
1
0.527186
-0.218169
-0.077081
0.262833
0
-1.024778
-0.214298
0.181199
-0.439236
0.947485
0.002678
0.990813
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.552749
1.874519
-0.86323
-0.439236
-0.387841
-0.494145
-0.884823
0.383551
1
-0.147864
-0.218169
-1.733237
0.262833
0
-0.569921
-0.214298
0.902734
1.523734
0.947485
0.747912
-0.259611
-2.02355
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.569921
-0.214298
1.513667
-0.439236
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
-1.176398
-1.258706
0.20196
1.13114
0.947485
0.747912
0.990813
0.383551
0
-0.147864
-0.218169
-2.147276
0.262833
0
-1.328017
-0.214298
1.646802
0.345952
0.947485
0.251089
0.990813
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
0.567224
-0.214298
-0.64798
0.738546
-0.387841
-0.742556
-0.884823
0.383551
1
1.875265
-0.218169
0.750997
0.262833
1
-0.266682
-0.214298
-1.567701
-0.046642
-0.387841
-0.742556
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
0.415604
1.874519
-0.293137
-0.046642
-0.387841
-0.742556
-0.884823
0.383551
1
-0.147864
-0.218169
0.750997
0.262833
1
-0.72154
-0.214298
0.077176
-0.439236
0.947485
-1.487789
-0.259611
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
-1.100588
-0.214298
-0.905331
-0.439236
-0.387841
0.002678
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-1.176398
-0.214298
2.303646
1.13114
0.947485
-0.742556
-0.259611
0.383551
1
-0.147864
-0.218169
1.579076
0.262833
0
1.870827
-1.258706
-0.525559
-0.83183
0.279822
-0.245733
1.616025
-3.227101
0
1.903638
-0.089209
-0.501041
-2.202809
0
-0.494111
-0.214298
-0.7207
1.13114
-0.387841
-1.487789
2.241237
0.383551
0
-0.147864
-0.218169
-1.402006
0.262833
1
0.839238
1.874519
2.544935
1.916328
-1.723167
0.4995
0.365601
-4.430651
1
1.014142
-0.160854
-0.530614
-2.202809
0
-0.873159
2.918927
0.026355
-0.439236
0.947485
0.996323
0.990813
0.383551
1
0.144886
-0.218169
-0.077081
0.262833
0
-1.100588
-0.214298
-0.620877
-1.224424
-0.387841
1.741557
-0.884823
-3.227101
1
-0.147864
-0.218169
-0.077081
0.427209
0
-0.494111
-0.214298
1.766638
-1.224424
0.947485
-0.990967
0.365601
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.342492
-1.258706
-0.187408
1.13114
-0.387841
0.747912
2.241237
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
1
0.339795
-1.258706
-0.782045
1.13114
1.615148
0.747912
1.616025
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
0.040081
0.830111
-0.315539
-3.579988
2.28281
-0.990967
2.241237
-4.430651
0
0.991307
-0.208941
0.739519
-1.216552
0
0.27799
-2.303114
0.147226
-3.579988
0.947485
-0.990967
1.616025
-4.430651
0
-0.098699
-0.151662
-0.16481
-1.70968
0
0.938557
-1.258706
0.554416
-0.046642
0.947485
1.493145
-0.259611
-0.819999
0
-0.270651
-0.332766
-0.058454
-4.997202
0
-0.569921
-0.214298
1.324296
-0.046642
-1.723167
-1.487789
1.616025
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
-0.494111
-0.214298
-0.422121
-0.439236
-0.387841
1.244734
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
1.931797
-0.214298
-1.16454
1.13114
-1.723167
-0.742556
1.616025
0.383551
1
3.59945
-0.218169
0.750997
0.262833
1
-0.569921
-1.258706
-0.345751
1.13114
-0.387841
0.747912
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
0.643033
1.874519
-0.137288
-0.439236
2.28281
-0.742556
-0.259611
0.383551
0
-0.147864
-0.218169
-0.905159
0.262833
0
-0.64573
-1.258706
-1.413824
-0.439236
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.039253
-0.214298
2.237495
-2.009612
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
1.022081
0.830111
-0.090305
1.916328
-0.387841
-0.742556
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.476939
-0.214298
0.575706
-1.617018
-0.387841
-0.990967
-0.884823
0.383551
1
0.549405
-0.218169
-0.077081
0.262833
1
0.643033
-0.214298
0.260906
1.13114
-0.387841
-0.742556
-0.884823
0.383551
1
-0.147864
-0.218169
0.750997
0.262833
0
1.022081
-0.214298
-0.531576
-0.046642
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
1.165036
0.262833
0
-1.252207
-0.214298
2.148982
-0.046642
0.947485
-1.487789
0.990813
0.383551
0
-0.147864
-0.218169
-0.077081
0.262833
0
1.628558
-0.214298
-0.539861
-0.439236
-0.387841
0.251089
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.552749
-0.214298
-0.484489
-1.617018
0.279822
0.996323
-0.259611
-3.227101
1
-0.147864
-0.218169
-0.077081
-3.024689
0
1.780178
-2.303114
-0.287355
-0.439236
2.28281
-0.742556
-0.259611
0.383551
0
-0.147864
-0.218169
-0.408312
0.262833
0
-0.039253
-0.214298
-0.310457
1.13114
-0.387841
1.244734
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
-1.252207
-0.214298
0.74387
-0.046642
0.947485
1.244734
0.990813
0.383551
0
-0.147864
-0.218169
-2.064468
0.262833
0
0.437181
1.874519
-0.350917
-0.439236
0.279822
0.4995
-0.884823
0.383551
1
-0.146497
-0.252879
-0.734899
-3.682194
1
-1.176398
-0.214298
0.387141
-0.046642
0.947485
0.251089
-0.259611
-3.227101
1
-0.147864
-0.218169
-0.077081
-5.161578
0
-1.176398
-0.214298
-0.232798
-0.046642
0.947485
0.002678
0.990813
0.383551
0
-0.147864
-0.218169
-2.147276
-4.339698
0
-1.024778
-0.214298
-0.824913
1.13114
-0.387841
-0.742556
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
0.036556
-0.214298
-0.731972
-0.439236
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-1.555446
-0.214298
-0.049295
-0.439236
0.947485
1.244734
0.990813
0.383551
0
-0.147864
-0.218169
-1.319198
0.262833
0
1.569557
3.963336
-0.303372
-0.439236
0.279822
-0.494145
1.616025
-0.819999
1
-0.243364
-0.469715
-0.174056
-5.819083
1
-0.797349
-0.214298
-0.055457
-0.046642
-0.387841
1.244734
-0.884823
0.383551
1
-0.147864
-0.218169
0.750997
0.262833
0
1.807564
-2.303114
-0.281797
-3.187394
1.615148
0.996323
2.241237
-4.430651
1
-0.124984
-0.033341
4.72338
-3.189065
1
-0.115063
1.874519
0.916414
-0.439236
0.279822
0.251089
1.616025
-2.02355
0
-0.147864
-0.218169
-0.077081
0.262833
0
-0.039253
-0.214298
-0.096344
-0.439236
-0.387841
-0.245733
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.64573
-0.214298
-1.613243
-0.046642
0.947485
-1.487789
-0.259611
0.383551
1
-0.147864
-0.218169
0.585382
0.262833
0
-0.342492
-0.214298
-0.336868
0.345952
-0.387841
1.244734
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.873159
-0.214298
0.27214
-0.046642
0.947485
-1.487789
-0.259611
-2.02355
0
-0.147864
-0.218169
-0.077081
-2.367185
0
-0.64573
-0.214298
-0.470573
-1.617018
1.615148
0.251089
-0.259611
-2.02355
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.022081
-0.214298
0.030232
-0.83183
1.615148
0.002678
1.616025
-2.02355
1
-0.147864
-0.218169
-0.077081
0.262833
0
-0.115063
1.874519
0.136047
-0.439236
-0.387841
1.244734
-0.884823
0.383551
1
-0.147864
-0.218169
0.336958
0.262833
0
-1.100588
-0.214298
-1.199445
-0.439236
0.947485
-0.990967
0.990813
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
-1.403827
-0.214298
-0.544374
-0.046642
0.947485
0.747912
0.990813
0.383551
0
-0.147864
-0.218169
-3.223778
0.262833
0
-0.64573
-2.303114
1.183406
1.13114
-0.387841
0.747912
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
1
-0.342492
-0.214298
-1.298178
-0.439236
0.947485
1.741557
1.616025
-2.02355
1
-0.147864
-0.218169
-0.905159
0.262833
0
0.718843
1.874519
-0.073175
2.308922
0.947485
0.747912
1.616025
0.383551
0
-0.147864
-0.218169
1.579076
0.262833
1
1.40113
-2.303114
1.179794
-0.046642
-0.387841
0.747912
-0.884823
-4.430651
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.780178
-0.214298
-1.378985
-0.439236
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.40113
1.874519
0.964012
-0.046642
-0.387841
-0.990967
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
0.262833
0
1.32532
-0.214298
0.432843
-2.402206
-0.387841
-1.487789
-0.884823
0.383551
1
-0.147864
-0.218169
-0.077081
-5.161578
0
0.567224
-1.258706
1.986126
2.308922
-0.387841
0.747912
2.241237
0.383551
0
-0.147864
4.475346
0.916613
0.262833
1
-1.100588
-0.214298
0.231547
-2.402206
0.947485
0.4995
0.990813
0.383551
0
-0.147864
-0.218169
-0.739543
-4.832826
0
End of preview.

DRO vs Naive Datasets

This repository contains preprocessed datasets for comparing Distributionally Robust Optimization (DRO) vs. Naive/Standard ML approaches in fairness-aware machine learning.

Datasets Included

1. Adult Income Dataset

  • Task: Binary classification (income >$50K vs ≤$50K)
  • Records: 45,222
  • Protected Attribute: Gender (sex)
  • Features: 12 features (5 numeric, 7 categorical)

2. Bank Credit Default Dataset

  • Task: Binary classification (credit default prediction)
  • Records: 30,000
  • Protected Attribute: Gender/Sex
  • Features: 22 features (13 numeric, 9 categorical)

Structure

Tabular/
├── Data/                       # Raw processed datasets
│   ├── adult_processed.csv
│   ├── adult_meta.json
│   ├── adult.py
│   ├── bank_processed.csv
│   ├── bank_meta.json
│   └── bank.py
└── Dataset/                    # Generated dataset variants
    ├── Adult_Datasets/
    └── Bank_Datasets/

Usage

from datasets import load_dataset
import pandas as pd

# Load Adult dataset
df_adult = pd.read_csv("hf://datasets/kuldeepbishnoi29/dro-vs-naive-datasets/Tabular/Data/adult_processed.csv")

# Load Bank dataset
df_bank = pd.read_csv("hf://datasets/kuldeepbishnoi29/dro-vs-naive-datasets/Tabular/Data/bank_processed.csv")

Citation

If you use these datasets, please cite the original sources:

  • Adult Income: UCI Machine Learning Repository
  • Bank Default: UCI Machine Learning Repository (ID: 350)

License

MIT License - See repository for details.

Downloads last month
443