Bundled datasets¶
These objects are loaded at import time from CSV files bundled with the package.
- eurocontrolpy.member_state = name iso3c iso2c icao iso3n date status 0 Albania ALB AL LA 8 1991-11-05 M 1 Armenia ARM AM UD 51 2012-01-01 M 2 Austria AUT AT LO 40 1993-01-01 M 3 Belgium BEL BE EB 56 1960-05-06 M 4 Bosnia and Herzegovina BIH BA LQ 70 2001-12-01 M 5 Bulgaria BGR BG LB 100 1993-01-01 M 6 Croatia HRV HR LD 191 1997-04-01 M 7 Cyprus CYP CY LC 196 2003-03-01 M 8 Czech Republic CZE CZ LK 203 1993-01-01 M 9 Denmark DNK DK EK 208 1960-05-06 M 10 Estonia EST EE EE 233 1996-11-13 M 11 Finland FIN FI EF 246 1960-05-06 M 12 France FRA FR LF 250 1960-05-06 M 13 Georgia GEO GE UG 268 2010-07-01 M 14 Germany DEU DE ED 276 1960-05-06 M 15 Greece GRC GR LG 300 1960-05-06 M 16 Hungary HUN HU LH 348 1993-01-01 M 17 Ireland IRL IE EI 372 1960-05-06 M 18 Italy ITA IT LI 380 1960-05-06 M 19 Kosovo XKX XK NaN 0 NaT NaN 20 Latvia LVA LV EV 428 1997-11-12 M 21 Lithuania LTU LT EY 440 1997-11-07 M 22 Luxembourg LUX LU EL 442 1960-05-06 M 23 Malta MLT MT LM 470 1998-01-07 M 24 Moldova MDA MD LU 498 2007-01-24 M 25 Monaco MCO MC LN 492 2005-09-28 M 26 Montenegro MNE ME LY 499 2011-01-01 M 27 Morocco MAR MA GM 504 2006-09-06 C 28 Netherlands NLD NL EH 528 1960-05-06 M 29 North Macedonia MKD MK LW 807 2002-02-27 M 30 Norway NOR NO EN 578 1960-05-06 M 31 Poland POL PL EP 616 1994-04-06 M 32 Portugal PRT PT LP 620 1960-05-06 M 33 Romania ROU RO LR 642 1993-01-01 M 34 Serbia SRB RS LY 688 2011-01-01 M 35 Slovak Republic SVK SK LZ 703 1993-01-01 M 36 Slovenia SVN SI LJ 705 1994-04-01 M 37 Spain ESP ES LE 724 1960-05-06 M 38 Sweden SWE SE ES 752 1960-05-06 M 39 Switzerland CHE CH LS 756 1960-05-06 M 40 Tunisia TUN TN DT 788 2012-11-01 C 41 Turkey TUR TR LT 792 1960-05-06 M 42 Ukraine UKR UA UK 804 2004-01-14 M 43 United Kingdom GBR GB EG 826 1960-05-06 M¶
Two-dimensional, size-mutable, potentially heterogeneous tabular data.
Data structure also contains labeled axes (rows and columns). Arithmetic operations align on both row and column labels. Can be thought of as a dict-like container for Series objects. The primary pandas data structure.
- Parameters:
data (
ndarray (structuredorhomogeneous),Iterable,dict, orDataFrame) –Dict can contain Series, arrays, constants, dataclass or list-like objects. If data is a dict, column order follows insertion-order. If a dict contains Series which have an index defined, it is aligned by its index. This alignment also occurs if data is a Series or a DataFrame itself. Alignment is done on Series/DataFrame inputs.
If data is a list of dicts, column order follows insertion-order.
index (
Indexorarray-like) – Index to use for resulting frame. Will default to RangeIndex if no indexing information part of input data and no index provided.columns (
Indexorarray-like) – Column labels to use for resulting frame when data does not have them, defaulting to RangeIndex(0, 1, 2, …, n). If data contains column labels, will perform column selection instead.dtype (
dtype, defaultNone) – Data type to force. Only a single dtype is allowed. If None, infer. Ifdatais DataFrame then is ignored.copy (
boolorNone, defaultNone) – Copy data from inputs. For dict data, the default of None behaves likecopy=True. For DataFrame or 2d ndarray input, the default of None behaves likecopy=False. If data is a dict containing one or more Series (possibly of different dtypes),copy=Falsewill ensure that these inputs are not copied.
See also
DataFrame.from_recordsConstructor from tuples, also record arrays.
DataFrame.from_dictFrom dicts of Series, arrays, or dicts.
read_csvRead a comma-separated values (csv) file into DataFrame.
read_tableRead general delimited file into DataFrame.
read_clipboardRead text from clipboard into DataFrame.
Notes
Please reference the User Guide for more information.
Examples
Constructing DataFrame from a dictionary.
>>> d = {"col1": [1, 2], "col2": [3, 4]} >>> df = pd.DataFrame(data=d) >>> df col1 col2 0 1 3 1 2 4
Notice that the inferred dtype is int64.
>>> df.dtypes col1 int64 col2 int64 dtype: object
To enforce a single dtype:
>>> df = pd.DataFrame(data=d, dtype=np.int8) >>> df.dtypes col1 int8 col2 int8 dtype: object
Constructing DataFrame from a dictionary including Series:
>>> d = {"col1": [0, 1, 2, 3], "col2": pd.Series([2, 3], index=[2, 3])} >>> pd.DataFrame(data=d, index=[0, 1, 2, 3]) col1 col2 0 0 NaN 1 1 NaN 2 2 2.0 3 3 3.0
Constructing DataFrame from numpy ndarray:
>>> df2 = pd.DataFrame( ... np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=["a", "b", "c"] ... ) >>> df2 a b c 0 1 2 3 1 4 5 6 2 7 8 9
Constructing DataFrame from a numpy ndarray that has labeled columns:
>>> data = np.array( ... [(1, 2, 3), (4, 5, 6), (7, 8, 9)], ... dtype=[("a", "i4"), ("b", "i4"), ("c", "i4")], ... ) >>> df3 = pd.DataFrame(data, columns=["c", "a"]) >>> df3 c a 0 3 1 1 6 4 2 9 7
Constructing DataFrame from dataclass:
>>> from dataclasses import make_dataclass >>> Point = make_dataclass("Point", [("x", int), ("y", int)]) >>> pd.DataFrame([Point(0, 0), Point(0, 3), Point(2, 3)]) x y 0 0 0 1 0 3 2 2 3
Constructing DataFrame from Series/DataFrame:
>>> ser = pd.Series([1, 2, 3], index=["a", "b", "c"]) >>> df = pd.DataFrame(data=ser, index=["a", "c"]) >>> df 0 a 1 c 3
>>> df1 = pd.DataFrame([1, 2, 3], index=["a", "b", "c"], columns=["x"]) >>> df2 = pd.DataFrame(data=df1, index=["a", "c"]) >>> df2 x a 1 c 3
A
pandas.DataFrameof EUROCONTROL Member / Agreement States.Columns:
Column
Description
nameCountry name (e.g.
"Italy")iso3cISO 3166-1 alpha-3 code (e.g.
"ITA")iso2cISO 3166-1 alpha-2 code (e.g.
"IT") — used byairlines_tidy()icaoICAO 2-letter prefix (e.g.
"LI")iso3nISO 3166-1 numeric code (e.g.
"380")dateDate of membership status change
status"M"(Member),"C"(Comprehensive Agreement), orNaN(Kosovo)Note
aircraft_typeandaircraft_modeldatasets from the R package are not bundled here due to size and update frequency. Fetch them directly from the ICAO Aircraft Type Designators list or supply your own CSV.