Datasets:
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 5 new columns ({'CustomerType', 'Name', 'Business', 'Geography', 'PEP_Flag'}) and 4 missing columns ({'ProductCode', 'AccountNumber', 'Balance', 'CurrencyCode'}).
This happened while the csv dataset builder was generating data using
hf://datasets/SBabu/BankingData/Data/customers.csv (at revision 81d02bb01d7b5e9467c338929fa60f24b87191fa)
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 1831, in _prepare_split_single
writer.write_table(table)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 644, 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 2272, in table_cast
return cast_table_to_schema(table, schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
CustomerID: string
Name: string
PEP_Flag: string
Business: int64
Geography: string
CustomerType: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 960
to
{'AccountNumber': Value('string'), 'CustomerID': Value('string'), 'ProductCode': Value('string'), 'CurrencyCode': Value('string'), 'Balance': Value('float64')}
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 1456, 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 1055, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 894, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 970, 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 1702, 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 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 5 new columns ({'CustomerType', 'Name', 'Business', 'Geography', 'PEP_Flag'}) and 4 missing columns ({'ProductCode', 'AccountNumber', 'Balance', 'CurrencyCode'}).
This happened while the csv dataset builder was generating data using
hf://datasets/SBabu/BankingData/Data/customers.csv (at revision 81d02bb01d7b5e9467c338929fa60f24b87191fa)
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.
AccountNumber string | CustomerID string | ProductCode string | CurrencyCode string | Balance float64 |
|---|---|---|---|---|
ACC00001 | CUST0001 | BUSL | USD | 419,852.65 |
ACC00002 | CUST0002 | BUSL | EUR | 238,383.17 |
ACC00003 | CUST0003 | BUSL | USD | 212,247.81 |
ACC00004 | CUST0004 | BUSL | USD | 989,344.39 |
ACC00005 | CUST0005 | BUSL | USD | 556,207.09 |
ACC00006 | CUST0006 | BUSL | USD | 358,856.12 |
ACC00007 | CUST0007 | BUSL | USD | 366,529.86 |
ACC00008 | CUST0008 | BUSL | EUR | 931,887.79 |
ACC00009 | CUST0009 | BUSL | JPY | 628,695.3 |
ACC00010 | CUST0010 | BUSL | GBP | 934,396.48 |
ACC00011 | CUST0011 | HOUL | USD | 734,859.99 |
ACC00012 | CUST0012 | HOUL | USD | 228,710.92 |
ACC00013 | CUST0013 | HOUL | GBP | 807,225.87 |
ACC00014 | CUST0014 | HOUL | ZAR | 339,455.41 |
ACC00015 | CUST0015 | HOUL | USD | 652,253.66 |
ACC00016 | CUST0016 | HOUL | USD | 471,794.42 |
ACC00017 | CUST0017 | HOUL | USD | 492,323.17 |
ACC00018 | CUST0018 | HOUL | USD | 899,203.42 |
ACC00019 | CUST0019 | HOUL | USD | 968,389.62 |
ACC00020 | CUST0020 | HOUL | DKK | 707,441.98 |
ACC00021 | CUST0021 | HOUL | USD | 594,653.36 |
ACC00022 | CUST0022 | HOUL | USD | 774,093.45 |
ACC00023 | CUST0023 | HOUL | USD | 308,550.98 |
ACC00024 | CUST0024 | HOUL | USD | 475,986.8 |
ACC00025 | CUST0025 | HOUL | EUR | 575,828.61 |
ACC00026 | CUST0026 | HOUL | JPY | 28,597.32 |
ACC00027 | CUST0027 | HOUL | EUR | 191,557.27 |
ACC00028 | CUST0028 | HOUL | USD | 500,638.64 |
ACC00029 | CUST0029 | HOUL | USD | 702,728.04 |
ACC00030 | CUST0030 | HOUL | USD | 642,080.95 |
ACC00031 | CUST0031 | PLON | USD | 705,276.26 |
ACC00032 | CUST0032 | GLON | USD | 36,768.62 |
ACC00033 | CUST0033 | CHEK | USD | 610,773.92 |
ACC00034 | CUST0034 | PLON | USD | 234,913.42 |
ACC00035 | CUST0035 | PLON | DKK | 323,123.26 |
ACC00036 | CUST0036 | LTLO | USD | 502,445.54 |
ACC00037 | CUST0037 | ELON | VEF | 166,283.28 |
ACC00038 | CUST0038 | SAVS | JPY | 248,976.4 |
ACC00039 | CUST0039 | GLON | USD | 479,420.17 |
ACC00040 | CUST0040 | BILLS | INR | 276,878.63 |
ACC00041 | CUST0041 | PLON | USD | 280,990.48 |
ACC00042 | CUST0042 | OVDF | USD | 832,678.29 |
ACC00043 | CUST0043 | OVDF | EUR | 278,239.77 |
ACC00044 | CUST0044 | LAPR | AUD | 822,655.61 |
ACC00045 | CUST0045 | LTLO | USD | 524,544.49 |
ACC00046 | CUST0046 | CHEK | EUR | 501,090.44 |
ACC00047 | CUST0047 | SAVS | GBP | 688,927.83 |
ACC00048 | CUST0048 | PLON | USD | 371,286.98 |
ACC00049 | CUST0049 | AUTL | USD | 62,725.48 |
ACC00050 | CUST0050 | ELON | USD | 11,866.39 |
ACC00051 | CUST0051 | GLON | USD | 927,371.83 |
ACC00052 | CUST0052 | SAVS | EUR | 377,684.62 |
ACC00053 | CUST0053 | BILLS | USD | 677,349.66 |
ACC00054 | CUST0054 | GLON | USD | 132,606.1 |
ACC00055 | CUST0055 | AUTL | USD | 941,195.55 |
ACC00056 | CUST0056 | GLON | CNY | 20,434.75 |
ACC00057 | CUST0057 | OVDF | ZAR | 309,160.31 |
ACC00058 | CUST0058 | FIXD | USD | 264,497.08 |
ACC00059 | CUST0059 | BILLS | USD | 452,336.99 |
ACC00060 | CUST0060 | LTLO | USD | 863,429.64 |
ACC00061 | CUST0061 | SMEL | CAD | 194,019.82 |
ACC00062 | CUST0062 | SAVS | USD | 29,814.89 |
ACC00063 | CUST0063 | FIXD | USD | 893,429.97 |
ACC00064 | CUST0064 | GLON | USD | 709,758.62 |
ACC00065 | CUST0065 | ELON | SGD | 108,405.52 |
ACC00066 | CUST0066 | LAPR | USD | 51,417.27 |
ACC00067 | CUST0067 | AUTL | USD | 711,203.61 |
ACC00068 | CUST0068 | BILLS | USD | 724,203.07 |
ACC00069 | CUST0069 | SAVS | EUR | 256,597.37 |
ACC00070 | CUST0070 | AUTL | USD | 132,539.81 |
ACC00071 | CUST0071 | OVDF | USD | 882,957.29 |
ACC00072 | CUST0072 | CHEK | GBP | 662,294.84 |
ACC00073 | CUST0073 | ELON | USD | 185,241.45 |
ACC00074 | CUST0074 | AUTL | USD | 293,130.76 |
ACC00075 | CUST0075 | PLON | USD | 918,287.57 |
ACC00076 | CUST0076 | AUTL | USD | 20,934.33 |
ACC00077 | CUST0077 | LTLO | GBP | 957,330.89 |
ACC00078 | CUST0078 | PLON | EUR | 602,075.72 |
ACC00079 | CUST0079 | GLON | CAD | 28,667.95 |
ACC00080 | CUST0080 | OVDF | USD | 188,501.01 |
ACC00081 | CUST0081 | BILLS | USD | 644,775.47 |
ACC00082 | CUST0082 | OVDF | USD | 456,050.11 |
ACC00083 | CUST0083 | LTLO | USD | 904,043.16 |
ACC00084 | CUST0084 | CHEK | USD | 396,626.11 |
ACC00085 | CUST0085 | GLON | USD | 169,391.67 |
ACC00086 | CUST0086 | ELON | USD | 572,490.55 |
ACC00087 | CUST0087 | OVDF | USD | 502,538.82 |
ACC00088 | CUST0088 | GLON | JPY | 437,975.66 |
ACC00089 | CUST0089 | OVDF | CAD | 591,815.79 |
ACC00090 | CUST0090 | PLON | USD | 82,068.96 |
ACC00091 | CUST0091 | OVDF | USD | 257,359.56 |
ACC00092 | CUST0092 | GLON | GBP | 345,390.26 |
ACC00093 | CUST0093 | GLON | USD | 835,984.96 |
ACC00094 | CUST0094 | SMEL | USD | 465,277.85 |
ACC00095 | CUST0095 | PLON | USD | 918,996.82 |
ACC00096 | CUST0096 | OVDF | EUR | 183,470.29 |
ACC00097 | CUST0097 | BILLS | USD | 563,314.51 |
ACC00098 | CUST0098 | OVDF | USD | 415,781.74 |
ACC00099 | CUST0099 | AUTL | USD | 246,400.49 |
ACC00100 | CUST0100 | BILLS | USD | 179,318.18 |
Banking Data
This is a banking customers, accounts and transaction dataset that can be used for any testing any banking use case such as Anti Money Launder (AML) compliance
Dataset Details
The bank is assumed to be blended bank (good mix of retail and corporate customers) based in the US. The code is parameterized to control the customer/account/transaction characteristics and volume
- Define and prepare master data format, seeded values and the risk levels of the seeded values (manually prepared)
- Define the format for the customer, account and transaction data
- Define exchange rate for the multi-currency transactions
- Define the key thresholds and conditions
- number of customers, accounts, transactions needed
- Risk thresholds: To control the high/medium/low risk composition of customers and transactions
- Allowed combinations for ‘product-transaction type’, ‘channel-transaction type’
- Transaction type for Funds Transfer International
- Currency Threshold: To control the composition of currency of the transactions
Master data used – Business of the customer (Business Code), Geography, Customer Type, Product, Transaction Channel, Transaction Type and Currency. These master data is prepared manually and each of the values for these master data is mapped to indicate the risk level. For HR-CP scenario all these master data is used except Transaction Type and Customer Type which are useful if the scope is expanded to cover other AML scenarios
Transaction data – Customer, Account and Transaction data are prepared synthetically using python scripts and Faker library. Effort is taken to ensure the transaction data reflects the production data to the extent possible with (a) volume thresholds based on currency, risk level (b) Right ratio of customers to accounts to transactions (c) Dependency between product-transaction type, channel-transaction types, currency-transaction types
A total of 400 customers, 1000 accounts and 10000 transactions are generated synthetically with a transaction date spanning around 15 days.
I have used this in an AI model developed for AML compliance and the details are in the Models section <>
Files
- BankingData-SyntheticData.ipynb – This file Colab notebook containing the code for generating customer, account and transaction data as mentioned above
- Input Files
- MasterData.xlsx, Conditions.xlsx - Two master data files which are input to the synthetic data generation
- Output Files
- customers.csv - has customer data for 400 customers
- accounts.csv - has customer data for 1000 accounts
- transactions.csv – has transaction details for 10000 transactions over 14 transaction days
- transactiionFeatures.csv - transaction file enriched with more features like counterparty business code, PEP flag etc which are needed for further analysis / modelling of transaction data
- Downloads last month
- 16