Dataset Preview
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 5 new columns ({'is_euro', 'is_usd', 'has_multiple_currencies', 'shared_currency', 'dollar_in_name'})

This happened while the csv dataset builder was generating data using

hf://datasets/danielrosehill/ISO-3166-4217-Consolidated/data/consolidated/csv/consolidated_enriched.csv (at revision 7b6dbcdd726c252f6d2139845bc576401cac8ce7)

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
              country_common_name: string
              iso_3166_alpha-2: string
              iso_3166_alpha-3: string
              iso_3166_code: int64
              iso_4217_currency_name_currency_1: string
              iso_4217_alphabetic_code_currency_1: string
              iso_4217_numeric_code_currency_1: double
              iso_4217_currency_name_currency_2: string
              iso_4217_alphabetic_code_currency_2: string
              iso_4217_numeric_code_currency_2: double
              has_multiple_currencies: int64
              shared_currency: int64
              is_usd: int64
              is_euro: int64
              dollar_in_name: int64
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 2403
              to
              {'country_common_name': Value('string'), 'iso_3166_alpha-2': Value('string'), 'iso_3166_alpha-3': Value('string'), 'iso_3166_code': Value('int64'), 'iso_4217_currency_name_currency_1': Value('string'), 'iso_4217_alphabetic_code_currency_1': Value('string'), 'iso_4217_numeric_code_currency_1': Value('float64'), 'iso_4217_currency_name_currency_2': Value('string'), 'iso_4217_alphabetic_code_currency_2': Value('string'), 'iso_4217_numeric_code_currency_2': 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 ({'is_euro', 'is_usd', 'has_multiple_currencies', 'shared_currency', 'dollar_in_name'})
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/danielrosehill/ISO-3166-4217-Consolidated/data/consolidated/csv/consolidated_enriched.csv (at revision 7b6dbcdd726c252f6d2139845bc576401cac8ce7)
              
              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.

country_common_name
string
iso_3166_alpha-2
string
iso_3166_alpha-3
string
iso_3166_code
int64
iso_4217_currency_name_currency_1
string
iso_4217_alphabetic_code_currency_1
string
iso_4217_numeric_code_currency_1
float64
iso_4217_currency_name_currency_2
null
iso_4217_alphabetic_code_currency_2
null
iso_4217_numeric_code_currency_2
null
Afghanistan
AF
AFG
4
Afghani
AFN
971
null
null
null
Åland Islands
AX
ALA
248
Euro
EUR
978
null
null
null
Albania
AL
ALB
8
Lek
ALL
8
null
null
null
Algeria
DZ
DZA
12
Algerian Dinar
DZD
12
null
null
null
American Samoa
AS
ASM
16
US Dollar
USD
840
null
null
null
Andorra
AD
AND
20
Euro
EUR
978
null
null
null
Angola
AO
AGO
24
Kwanza
AOA
973
null
null
null
Anguilla
AI
AIA
660
East Caribbean Dollar
XCD
951
null
null
null
Antarctica
AQ
ATA
10
null
null
null
null
null
null
Antigua and Barbuda
AG
ATG
28
East Caribbean Dollar
XCD
951
null
null
null
Argentina
AR
ARG
32
Argentine Peso
ARS
32
null
null
null
Armenia
AM
ARM
51
Armenian Dram
AMD
51
null
null
null
Aruba
AW
ABW
533
Aruban Florin
AWG
533
null
null
null
Australia
AU
AUS
36
Australian Dollar
AUD
36
null
null
null
Austria
AT
AUT
40
Euro
EUR
978
null
null
null
Azerbaijan
AZ
AZE
31
Azerbaijan Manat
AZN
944
null
null
null
Bahamas
BS
BHS
44
Bahamian Dollar
BSD
44
null
null
null
Bahrain
BH
BHR
48
Bahraini Dinar
BHD
48
null
null
null
Bangladesh
BD
BGD
50
Taka
BDT
50
null
null
null
Barbados
BB
BRB
52
Barbados Dollar
BBD
52
null
null
null
Belarus
BY
BLR
112
Belarusian Ruble
BYN
933
null
null
null
Belgium
BE
BEL
56
Euro
EUR
978
null
null
null
Belize
BZ
BLZ
84
Belize Dollar
BZD
84
null
null
null
Benin
BJ
BEN
204
CFA Franc BCEAO
XOF
952
null
null
null
Bermuda
BM
BMU
60
Bermudian Dollar
BMD
60
null
null
null
Bhutan
BT
BTN
64
Indian Rupee
INR
356
null
null
null
Bolivia, Plurinational State of
BO
BOL
68
Boliviano
BOB
68
null
null
null
Bonaire, Sint Eustatius and Saba
BQ
BES
535
US Dollar
USD
840
null
null
null
Bosnia and Herzegovina
BA
BIH
70
Convertible Mark
BAM
977
null
null
null
Botswana
BW
BWA
72
Pula
BWP
72
null
null
null
Bouvet Island
BV
BVT
74
Norwegian Krone
NOK
578
null
null
null
Brazil
BR
BRA
76
Brazilian Real
BRL
986
null
null
null
British Indian Ocean Territory
IO
IOT
86
US Dollar
USD
840
null
null
null
Brunei Darussalam
BN
BRN
96
Brunei Dollar
BND
96
null
null
null
Bulgaria
BG
BGR
100
Bulgarian Lev
BGN
975
null
null
null
Burkina Faso
BF
BFA
854
CFA Franc BCEAO
XOF
952
null
null
null
Burundi
BI
BDI
108
Burundi Franc
BIF
108
null
null
null
Cabo Verde
CV
CPV
132
Cabo Verde Escudo
CVE
132
null
null
null
Cambodia
KH
KHM
116
Riel
KHR
116
null
null
null
Cameroon
CM
CMR
120
CFA Franc BEAC
XAF
950
null
null
null
Canada
CA
CAN
124
Canadian Dollar
CAD
124
null
null
null
Cayman Islands
KY
CYM
136
Cayman Islands Dollar
KYD
136
null
null
null
Central African Republic
CF
CAF
140
CFA Franc BEAC
XAF
950
null
null
null
Chad
TD
TCD
148
CFA Franc BEAC
XAF
950
null
null
null
Chile
CL
CHL
152
Chilean Peso
CLP
152
null
null
null
China
CN
CHN
156
Yuan Renminbi
CNY
156
null
null
null
Christmas Island
CX
CXR
162
Australian Dollar
AUD
36
null
null
null
Cocos (Keeling) Islands
CC
CCK
166
Australian Dollar
AUD
36
null
null
null
Colombia
CO
COL
170
Colombian Peso
COP
170
null
null
null
Comoros
KM
COM
174
Comorian Franc
KMF
174
null
null
null
Congo
CG
COG
178
CFA Franc BEAC
XAF
950
null
null
null
Congo, Democratic Republic of the
CD
COD
180
Congolese Franc
CDF
976
null
null
null
Cook Islands
CK
COK
184
New Zealand Dollar
NZD
554
null
null
null
Costa Rica
CR
CRI
188
Costa Rican Colon
CRC
188
null
null
null
Côte d'Ivoire
CI
CIV
384
CFA Franc BCEAO
XOF
952
null
null
null
Croatia
HR
HRV
191
Euro
EUR
978
null
null
null
Cuba
CU
CUB
192
Cuban Peso
CUP
192
null
null
null
Curaçao
CW
CUW
531
Caribbean Guilder
XCG
532
null
null
null
Cyprus
CY
CYP
196
Euro
EUR
978
null
null
null
Czechia
CZ
CZE
203
Czech Koruna
CZK
203
null
null
null
Denmark
DK
DNK
208
Danish Krone
DKK
208
null
null
null
Djibouti
DJ
DJI
262
Djibouti Franc
DJF
262
null
null
null
Dominica
DM
DMA
212
East Caribbean Dollar
XCD
951
null
null
null
Dominican Republic
DO
DOM
214
Dominican Peso
DOP
214
null
null
null
Ecuador
EC
ECU
218
US Dollar
USD
840
null
null
null
Egypt
EG
EGY
818
Egyptian Pound
EGP
818
null
null
null
El Salvador
SV
SLV
222
US Dollar
USD
840
null
null
null
Equatorial Guinea
GQ
GNQ
226
CFA Franc BEAC
XAF
950
null
null
null
Eritrea
ER
ERI
232
Nakfa
ERN
232
null
null
null
Estonia
EE
EST
233
Euro
EUR
978
null
null
null
Eswatini
SZ
SWZ
748
Lilangeni
SZL
748
null
null
null
Ethiopia
ET
ETH
231
Ethiopian Birr
ETB
230
null
null
null
Falkland Islands (Malvinas)
FK
FLK
238
null
null
null
null
null
null
Faroe Islands
FO
FRO
234
Danish Krone
DKK
208
null
null
null
Fiji
FJ
FJI
242
Fiji Dollar
FJD
242
null
null
null
Finland
FI
FIN
246
Euro
EUR
978
null
null
null
France
FR
FRA
250
Euro
EUR
978
null
null
null
French Guiana
GF
GUF
254
Euro
EUR
978
null
null
null
French Polynesia
PF
PYF
258
CFP Franc
XPF
953
null
null
null
French Southern Territories
TF
ATF
260
Euro
EUR
978
null
null
null
Gabon
GA
GAB
266
CFA Franc BEAC
XAF
950
null
null
null
Gambia
GM
GMB
270
Dalasi
GMD
270
null
null
null
Georgia
GE
GEO
268
Lari
GEL
981
null
null
null
Germany
DE
DEU
276
Euro
EUR
978
null
null
null
Ghana
GH
GHA
288
Ghana Cedi
GHS
936
null
null
null
Gibraltar
GI
GIB
292
Gibraltar Pound
GIP
292
null
null
null
Greece
GR
GRC
300
Euro
EUR
978
null
null
null
Greenland
GL
GRL
304
Danish Krone
DKK
208
null
null
null
Grenada
GD
GRD
308
East Caribbean Dollar
XCD
951
null
null
null
Guadeloupe
GP
GLP
312
Euro
EUR
978
null
null
null
Guam
GU
GUM
316
US Dollar
USD
840
null
null
null
Guatemala
GT
GTM
320
Quetzal
GTQ
320
null
null
null
Guernsey
GG
GGY
831
Pound Sterling
GBP
826
null
null
null
Guinea
GN
GIN
324
Guinean Franc
GNF
324
null
null
null
Guinea-Bissau
GW
GNB
624
CFA Franc BCEAO
XOF
952
null
null
null
Guyana
GY
GUY
328
Guyana Dollar
GYD
328
null
null
null
Haiti
HT
HTI
332
Gourde
HTG
332
null
null
null
Heard Island and McDonald Islands
HM
HMD
334
Australian Dollar
AUD
36
null
null
null
Holy See
VA
VAT
336
Euro
EUR
978
null
null
null
Honduras
HN
HND
340
Lempira
HNL
340
null
null
null
End of preview.

ISO-3166 & ISO-4217 "Consolidated" Lookup Dataset

This dataset contains a mapping between ISO-3166 (countries) and ISO-4217 (currencies).

The objective was to create a single dataset to support everyday workloads in international financial analysis undertaken by "casual" / non-official actors and analysts.

Version

V1

Compiled by: Daniel Rosehill Date: 03-09 (September) - 2025

Note: geopolitics and the global financial system are clearly dynamic concepts.

Much as this dataset is totally unofficial (and should be used accordingly) it also reflects a mapping based upon a static copy of the data sourced on September 03, 2025.

ISO-4217 provides a separate sub-standard for historic currencies. Countries change name from time to time, secede, join monetary alliances, etc. These changes are reflected in the ongoing revision process of the ISO standards which also (ISO-4217) provides a lookup for former/deprecated currencies.

Provenance / Edits

To reflect the intended

  • Several currencies provided in ISO-4217 and which are not the permament formal/national currency of current soverign entities were excludedc from the matching logic.

  • See changelog.md for a list of these. These include multilateral mechanisms like Special Drawing Rights.

Enriched Data

A few Booleans were added to help quickly identify outliers in the international currency system such as the (relatively few) countries in which there are multiple legaly units of tender, as captured in ISO-4217.


Repository Organisation

Original Data Sources

  • source/edited/iso-3166.csv: ISO 3166 territory list (edited copy).
  • source/edited/iso-4217-edited.csv: ISO 4217 currency list (edited to remove special instruments and historical entries).

Consolidated / Mapped Data

As CSV

  • consolidated.csv: Base consolidated table with ISO identifiers and up to two currencies per territory.
  • consolidated_enriched.csv: Same as base plus derived flags for common analyses.

As JSON

  • consolidatd.json: JSON array version of the base consolidated table.
  • consolidated_enriched.json: JSON array version of the enriched table (flags as booleans).

Data Dictionary

  • country_common_name: Territory name from ISO 3166.
  • iso_3166_alpha-2: Two-letter country code.
  • iso_3166_alpha-3: Three-letter country code.
  • iso_3166_code: Numeric country code.
  • iso_4217_currency_name_currency_1: Primary currency name.
  • iso_4217_alphabetic_code_currency_1: Primary 4217 alphabetic currency code.
  • iso_4217_numeric_code_currency_1: Primary 4217 numeric currency code.
  • iso_4217_currency_name_currency_2: Secondary currency name (if applicable).
  • iso_4217_alphabetic_code_currency_2: Secondary 4217 alphabetic code (if applicable).
  • iso_4217_numeric_code_currency_2: Secondary 4217 numeric code (if applicable).
  • has_multiple_currencies (enriched): 1 if two currencies listed for the territory, else 0.
  • shared_currency (enriched): 1 if any listed currency code is used by multiple territories, else 0.
  • is_usd (enriched): 1 if USD is one of the listed currencies, else 0.
  • is_euro (enriched): 1 if EUR is one of the listed currencies, else 0.
  • dollar_in_name (enriched): 1 if any listed currency name contains the word “Dollar,” else 0.
Downloads last month
14

Collections including danielrosehill/ISO-3166-4217-Consolidated