1. Cats and dogs


In [74]:
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

In [6]:
df = pd.read_csv("07-hw-animals.csv")

In [8]:
df.columns


Out[8]:
Index(['animal', 'name', 'length'], dtype='object')

In [9]:
df.head(3)


Out[9]:
animal name length
0 cat Anne 35
1 cat Bob 45
2 dog Egglesburg 65

In [11]:
df.sort_values(by='length', ascending=False).head(3)


Out[11]:
animal name length
2 dog Egglesburg 65
3 dog Devon 50
1 cat Bob 45

In [23]:
df['animal'].value_counts()


Out[23]:
dog    3
cat    3
Name: animal, dtype: int64

In [25]:
dogs = df[df['animal']=='dog']
dogs


Out[25]:
animal name length
2 dog Egglesburg 65
3 dog Devon 50
5 dog Fontaine 35

In [28]:
df[df['length'] > 40]


Out[28]:
animal name length
1 cat Bob 45
2 dog Egglesburg 65
3 dog Devon 50

In [29]:
df['inches'] = .393701 * df['length']

In [30]:
df


Out[30]:
animal name length inches
0 cat Anne 35 13.779535
1 cat Bob 45 17.716545
2 dog Egglesburg 65 25.590565
3 dog Devon 50 19.685050
4 cat Charlie 32 12.598432
5 dog Fontaine 35 13.779535

In [31]:
cats = df[df['animal']=='cat']
dogs = df[df['animal']=='dog']

In [37]:
# Display all of the animals that are cats and above 12 inches long.
# First do it using the "cats" variable, then do it using your normal dataframe.

cats[cats['inches'] > 12]
df[(df['animal'] == 'cat') & (df['inches'] > 12)]


Out[37]:
animal name length inches
0 cat Anne 35 13.779535
1 cat Bob 45 17.716545
4 cat Charlie 32 12.598432

In [47]:
cats['length'].describe()[['mean']]


Out[47]:
mean    37.333333
Name: length, dtype: float64

In [48]:
dogs['length'].describe()[['mean']]


Out[48]:
mean    50.0
Name: length, dtype: float64

In [58]:
animals = df.groupby( [ "animal"] )
animals['length'].mean()


Out[58]:
animal
cat    37.333333
dog    50.000000
Name: length, dtype: float64

In [103]:
plt.style.use('ggplot')
dogs['length'].hist()


Out[103]:
<matplotlib.axes._subplots.AxesSubplot at 0x104bb03c8>

In [104]:
labels = dogs['name']
sizes = dogs['length']
explode = (0.1, 0.2, 0.2) # fun

plt.pie(sizes, explode=explode, labels=labels,
        autopct='%1.2f%%', shadow=True, startangle=30)

#cf: recent.head().plot(kind='pie', y='networthusbillion', labels=recent['name'].head(), legend=False)


Out[104]:
([<matplotlib.patches.Wedge at 0x104988b00>,
  <matplotlib.patches.Wedge at 0x104d02d68>,
  <matplotlib.patches.Wedge at 0x104ecbba8>],
 [<matplotlib.text.Text at 0x104a5aef0>,
  <matplotlib.text.Text at 0x1049a3e80>,
  <matplotlib.text.Text at 0x104f40438>],
 [<matplotlib.text.Text at 0x1049ab0f0>,
  <matplotlib.text.Text at 0x104ecb8d0>,
  <matplotlib.text.Text at 0x104f40b38>])

In [105]:
#Make a horizontal bar graph of the length of the animals, with their name as the label
df.plot(kind='barh', x='name', y='length', legend=False)


Out[105]:
<matplotlib.axes._subplots.AxesSubplot at 0x1045fa470>

In [106]:
#Make a sorted horizontal bar graph of the cats, with the larger cats on top.
cats.sort_values(by='length').plot(kind='barh', x='name', y='length', legend=False)


Out[106]:
<matplotlib.axes._subplots.AxesSubplot at 0x10567d710>

2. Millionaires

What country are most billionaires from? For the top ones, how many billionaires per billion people?


In [108]:
df2 = pd.read_excel("richpeople.xlsx")

In [109]:
df2.keys()


Out[109]:
Index(['year', 'name', 'rank', 'citizenship', 'countrycode',
       'networthusbillion', 'selfmade', 'typeofwealth', 'gender', 'age',
       'industry', 'IndustryAggregates', 'region', 'north',
       'politicalconnection', 'founder', 'generationofinheritance', 'sector',
       'company', 'companytype', 'relationshiptocompany', 'foundingdate',
       'gdpcurrentus', 'sourceofwealth', 'notes', 'notes2', 'source',
       'source_2', 'source_3', 'source_4'],
      dtype='object')

In [119]:
df2['citizenship'].value_counts().head(10)


Out[119]:
United States     903
Germany           160
China             153
Russia            119
Japan              96
Brazil             81
Hong Kong          77
France             72
United Kingdom     65
India              63
Name: citizenship, dtype: int64

In [125]:
# population: data from http://data.worldbank.org/indicator/SP.POP.TOTL
df_pop = pd.read_csv("world_pop.csv", header=2)

In [135]:
df_pop.keys()
#recent_pop = df_pop['2015']

#join: see http://pandas.pydata.org/pandas-docs/stable/merging.html#joining-on-index
left = pd.DataFrame(df2, index=['countrycode'])
right = pd.DataFrame(df_pop, index=['Country Code'])

millionaires_and_pop = left.join(right)
result = pd.merge(left, right, left_index=True, right_index=True, how='outer')

In [136]:
millionaires_and_pop
result
#millionaires_and_pop['citizenship'].value_counts().head(10)


Out[136]:
year name rank citizenship countrycode networthusbillion selfmade typeofwealth gender age ... 2007 2008 2009 2010 2011 2012 2013 2014 2015 Unnamed: 60
Country Code NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
countrycode NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN

2 rows × 91 columns

What's the average wealth of a billionaire? Male? Female?


In [145]:
print("The average wealth of a billionaire (in billions) is:", df2['networthusbillion'].describe()['mean'])

print("The average wealth of a male billionaire is:", df2[df2['gender'] == 'male']['networthusbillion'].describe()['mean'])

print("The average wealth of a female billionaire is:", df2[df2['gender'] == 'female']['networthusbillion'].describe()['mean'])


The average wealth of a billionaire (in billions) is: 3.53194338179
The average wealth of a male billionaire is: 3.5168814433
The average wealth of a female billionaire is: 3.81927710843

Who is the poorest billionaire? Who are the top 10 poorest billionaires?


In [188]:
print('The poorest billionaire is:', df2.get_value(df2.sort_values('networthusbillion', ascending=True).index[0],'name'))

df2.sort_values('networthusbillion', ascending=True).head(10)


The poorest billionaire is: T.S. Kalyanaraman
Out[188]:
year name rank citizenship countrycode networthusbillion selfmade typeofwealth gender age ... relationshiptocompany foundingdate gdpcurrentus sourceofwealth notes notes2 source source_2 source_3 source_4
2316 2014 T.S. Kalyanaraman 1565 India IND 1.0 self-made founder non-finance male 66.0 ... founder 1993.0 NaN jewelry NaN NaN http://en.wikipedia.org/wiki/T.S._Kalyanaraman http://www.bloomberg.com/news/articles/2013-01... NaN NaN
1202 2001 John Todd 490 New Zealand NZL 1.0 inherited inherited male NaN ... relation 1929.0 5.387259e+10 NaN 3rd generation NaN http://en.wikipedia.org/wiki/Todd_Corporation#... http://en.wikipedia.org/wiki/Bryan_Todd_(New_Z... Inside the Todd empire The New Zealand Herald ... NaN
482 2014 Dariusz Milek 1565 Poland POL 1.0 self-made self-made finance male 46.0 ... founder 1989.0 NaN real estate, retail NaN NaN http://pl.wikipedia.org/wiki/Dariusz_Mi%C5%82ek http://www.forbes.com/profile/dariusz-milek/ NaN NaN
1204 2014 John Van Lieshout 1565 Australia AUS 1.0 self-made self-made finance male 68.0 ... founder NaN NaN real estate NaN NaN http://www.forbes.com/profile/john-van-lieshout/ The Courier Mail (Australia) July 25, 2015 Sat... NaN NaN
2174 2014 Serhiy Tihipko 1565 Ukraine UKR 1.0 self-made self-made finance male 54.0 ... founder 1992.0 NaN banking, agriculture NaN NaN http://www.forbes.com/profile/serhiy-tihipko/ http://en.wikipedia.org/wiki/PrivatBank http://www.kyivpost.com/content/business/priva... NaN
2547 2014 Wu Chung-Yi 1565 Taiwan Taiwan 1.0 self-made executive male 55.0 ... investor 1991.0 NaN manufacturing NaN NaN http://www.forbes.com/profile/wu-chung-yi/ http://en.wikipedia.org/wiki/Tingyi_(Cayman_Is... Tingyi-Campbell sale talks stay on track South... NaN
122 2001 Amalia Lacroze de Fortabat 490 Argentina ARG 1.0 inherited inherited female NaN ... relation 1926.0 2.690000e+11 NaN widow NaN http://en.wikipedia.org/wiki/Mar%C3%ADa_Amalia... Australian Financial Review February 28, 2014 ... NaN NaN
1019 1996 Jack Taylor 421 United States USA 1.0 self-made founder non-finance male 0.0 ... founder 1957.0 8.100200e+12 NaN NaN NaN http://en.wikipedia.org/wiki/Jack_C._Taylor http://www.forbes.com/profile/jack-taylor/ FATHER AND SON WHO BUILT ENTERPRISE ACCEPT CIT... NaN
475 1996 Daniel Ziff 419 United States USA 1.0 inherited inherited male 24.0 ... relation 1927.0 8.100200e+12 NaN 3rd generation NaN http://en.wikipedia.org/wiki/Ziff_Davis http://en.wikipedia.org/wiki/William_Bernard_Z... http://www.wsj.com/articles/ziffs-shut-down-he... NaN
2123 1996 Saleh Kamel 403 Saudi Arabia SAU 1.0 self-made self-made finance male 54.0 ... founder 1969.0 1.577430e+11 NaN NaN NaN http://en.wikipedia.org/wiki/Saleh_Abdullah_Kamel ISLAMIC BANKS TURN ATTENTION TO US MARKET The ... NaN NaN

10 rows × 30 columns

What is 'relationship to company'? And what are the most common relationships?


In [222]:
#relationship_values = set
relationship_list = df2['relationshiptocompany'].tolist()
relationship_set = set(relationship_list)
relationship_set = [s.strip() for s in relationship_set if s == s] # to remove a naughty NaN and get rid of dumb whitespaces

print("The relationships are:", str.join(', ', relationship_set))

print('\nThe five most common relationships are:')

df2['relationshiptocompany'].value_counts().head(5)


The relationships are: investor, founder and chairman, Chairman/founder, chairman, former CEO, Chairman/shareholder, co-director of zinc, copper and lead, founder, chairwoman, ceo, founder and ceo, deputy chairman, former chairman and CEO, Chairman, CEO, founder/relation, chairwomen, Exectuitve Director, Chairman and Chief Executive Officer, investor, Chairman, leadership, founder and executive chairman, founder and chairwoman, vice chairman, Vice Chairman, relative, relation/vice chairman, partner, vice-chairman, director, COO, founder/chairman, owner, Vice President, founder, chairman, ceo, founder and CEO, Chief Executive, founder, co-chairman, founder/CEO, inventor, Chairman and Chief Executive Officer, owner and vice chair, chairman of the board, inherited, Vice President of Infrastructure Software, founder CEO owner, head of Microsoft's application software group, lawyer, Honorary President for Life, investor/founder, relation and chairman, president and ceo, executive chairman, founder/vice chairman, head of high-yield bond trading dept, founder/president, founder and executive vice chairman, ceo, CEO, president, Head of Board of Directors, general director, founder, chairman, lawer, chairman of management committee, chariman, relation and ceo, Relation, relation, supervisory board or directors, employee, chairman and ceo, owner and former CEO, shareholder, investor and  CEO, Global Head of Real Estate

The five most common relationships are:
Out[222]:
founder     1214
relation     945
owner         94
chairman      76
investor      36
Name: relationshiptocompany, dtype: int64

Most common source of wealth? Male vs. female?


In [233]:
print("The three most common sources of wealth are:\n" + str(df2['typeofwealth'].value_counts().head(3)))

print("\nFor men, they are:\n" + str(df2[df2['gender'] == 'male']['typeofwealth'].value_counts().head(3)))

print("\nFor women, they are:\n" + str(df2[df2['gender'] == 'female']['typeofwealth'].value_counts().head(3)))


The three most common sources of wealth are:
inherited              953
founder non-finance    713
self-made finance      500
Name: typeofwealth, dtype: int64

For men, they are:
inherited              724
founder non-finance    687
self-made finance      493
Name: typeofwealth, dtype: int64

For women, they are:
inherited              205
founder non-finance     25
self-made finance        7
Name: typeofwealth, dtype: int64

Given the richest person in a country, what % of the GDP is their wealth?


In [303]:
#per_country = df2.groupby(['citizenship'])
#per_country['networthusbillion'].max()
#per_country['networthusbillion'].idxmax() # DataFrame.max(axis=None, skipna=None, level=None, numeric_only=None, **kwargs)
# per_country['gdpcurrentus']

df2['percofgdp'] = (100*1000000000*df2['networthusbillion']) / (df2['gdpcurrentus'])


#pd.Series(["{0:.2f}%".format(percofgdp)])

print("NB: most countries doesn't have their GDP in the 'gdpcurrentus' column.")

df2.loc[per_country['networthusbillion'].idxmax()][['name', 'networthusbillion', 'percofgdp']]


NB: most countries doesn't have their GDP in the 'gdpcurrentus' column.
Out[303]:
name networthusbillion percofgdp
1011 Issad Rebrab 3.2 NaN
1005 Isabel dos Santos 3.7 NaN
338 Carlos and Alejandro Bulgheroni 5.5 NaN
819 Gina Rinehart 17.7 NaN
556 Dietrich Mateschitz 9.2 NaN
24 Ahmed Ali Kanoo 1.0 16.393443
50 Albert Frere 4.9 NaN
672 Ernest Stempel 2.1 57.065217
1223 Jorge Paulo Lemann 19.7 NaN
523 David Thomson 22.6 NaN
998 Iris Fontbona 15.5 NaN
2473 Wang Jianlin 15.1 NaN
1519 Luis Carlos Sarmiento 14.2 NaN
1168 John Fredriksen 13.6 NaN
1859 Petr Kellner 11.0 NaN
1333 Kjeld Kirk Kristiansen 10.2 NaN
120 Alvaro Noboa 1.2 4.761905
1747 Nassef Sawiris 6.7 NaN
199 Antti Herlin 3.3 NaN
1469 Liliane Bettencourt 34.5 NaN
280 Bidzina Ivanishvili 5.2 NaN
1275 Karl Albrecht 25.0 NaN
2226 Spiro Latsis 4.6 3.382353
2263 Stephen Lansdown 2.4 NaN
1454 Li Ka-shing 31.0 NaN
1728 Mukesh Ambani 18.6 NaN
1915 R Budi Hartono 7.6 NaN
1798 Pallonji Mistry 12.8 NaN
690 Eyal Ofer 7.0 NaN
1680 Michele Ferrero 26.5 NaN
... ... ... ...
842 Graeme Hart 7.0 NaN
111 Aliko Dangote 25.0 NaN
2251 Stein Erik Hagen 5.0 NaN
1712 Mohammed Al Barwani 1.2 NaN
615 Eduardo Belmont Anderson 2.5 NaN
933 Henry Sy 11.4 NaN
1070 Jan Kulczyk 3.6 NaN
125 Americo Amorim 5.3 NaN
996 Ioan Niculae 1.2 NaN
112 Alisher Usmanov 18.6 NaN
1902 Prince Alwaleed Bin Talal Alsaud 20.4 NaN
2008 Robert & Philip Ng 11.0 NaN
1144 Johann Rupert 7.6 NaN
1405 Lee Kun-Hee 11.1 NaN
124 Amancio Ortega 64.0 NaN
1023 Jacky Xu 1.2 NaN
1749 Nathan Kirsh 3.7 NaN
2242 Stefan Persson 34.4 NaN
1785 Oeri Hoffman and Sacher 13.1 3.969697
2407 Tsai Wan-lin 12.2 NaN
2092 Rostam Azizi 1.0 NaN
543 Dhanin Chearavanont 11.4 NaN
1734 Mustafa Rahmi Koc 4.0 2.204148
2288 Sudhir Ruparelia 1.1 NaN
2005 Rinat Akhmetov 12.5 NaN
6 Abdulla bin Ahmad Al Ghurair 4.8 NaN
797 Gerald Cavendish Grosvenor 13.0 NaN
284 Bill Gates 76.0 NaN
857 Gustavo Cisneros 5.3 4.312098
1863 Pham Nhat Vuong 1.6 NaN

73 rows × 3 columns

Trains stations


In [313]:
df_trains = pd.read_csv("stations.csv", delimiter=';')
df_trains


Out[313]:
didok station_name accessible_ticket accessible_wc rollstuhl_verlad mobilift stepless_perron bats autelca automat_ktu geopos TUNummer Betriebspunkttyp
0 10 Basel SBB 1.0 1.0 1.0 1.0 1.0 10 Min. Übergangszeit für Züge von und nach Fr... 0.0 19.0 47.5474041527, 7.58955146721 1 Haltestelle
1 2213 Wohlen 1.0 1.0 1.0 1.0 1.0 NaN 0.0 2.0 47.3484618374, 8.26978121872 1 Haltestelle_und_Bedienpunkt
2 2116 Schinznach Bad 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 47.4517752695, 8.16692832223 1 Haltestelle
3 2211 Hendschiken 1.0 0.0 1.0 0.0 0.0 NaN 0.0 1.0 47.3894242237, 8.20737399629 1 Haltestelle
4 2226 Knonau 0.0 0.0 0.0 1.0 1.0 NaN 0.0 1.0 47.2202591199, 8.4667085831 1 Haltestelle
5 3105 Uetikon 0.0 0.0 1.0 1.0 1.0 NaN 0.0 1.0 47.2590294057, 8.678774746 1 Haltestelle_und_Bedienpunkt
6 3015 Zürich Wipkingen 0.0 0.0 1.0 0.0 0.0 NaN 0.0 1.0 47.3930313233, 8.52935905447 1 Haltestelle
7 3112 Kempraten 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 47.2383929337, 8.81429184846 1 Haltestelle
8 3100 Zollikon 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.3373317337, 8.569717612 1 Haltestelle
9 3502 Siggenthal-Würenlingen 0.0 0.0 0.0 0.0 0.0 Postauto fahren ab Bahnhofplatz 0.0 1.0 47.5179218559, 8.24015363326 1 Haltestelle_und_Bedienpunkt
10 3505 Wettingen 0.0 0.0 1.0 1.0 1.0 Gleise 1, 3, 4 und 5 stufenlos zugänglich. 0.0 0.0 47.4596367944, 8.3159863528 1 Haltestelle_und_Bedienpunkt
11 3427 Schlatt 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.6795011585, 8.68749675648 1 Haltestelle_und_Bedienpunkt
12 3527 Buchs-Dällikon 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.4533973239, 8.43557852512 1 Haltestelle
13 3429 Schlattingen 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.6666263051, 8.77041438581 1 Haltestelle
14 4007 Moreillon 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 46.5083872786, 6.78564812794 1 Haltestelle
15 2237 Lupfig 0.0 0.0 0.0 1.0 1.0 Postautohaltestelle Lupfig Bahnhof = 3 Minuten... 0.0 0.0 47.4451758366, 8.21496733295 1 Haltestelle_und_Bedienpunkt
16 3007 Zürich Seebach 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.4187469105, 8.54463614173 1 Haltestelle_und_Bedienpunkt
17 3001 Zürich Altstetten 1.0 1.0 1.0 1.0 1.0 NaN 0.0 2.0 47.3914808361, 8.4889402654 1 Haltestelle
18 2229 Urdorf Weihermatt 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.3809708849, 8.43033031194 1 Haltestelle
19 3011 Zürich Wiedikon 0.0 0.0 0.0 0.0 1.0 NaN 0.0 2.0 47.3714716204, 8.52346258297 1 Haltestelle
20 2300 Zug Postplatz 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.168273486, 8.51691604796 1 Haltestelle
21 2231 Zug Oberwil 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.147675872, 8.50992153777 1 Haltestelle
22 3313 Niederglatt 0.0 0.0 0.0 1.0 1.0 NaN 0.0 1.0 47.4874689477, 8.50329612568 1 Haltestelle_und_Bedienpunkt
23 3316 Steinmaur 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 47.4899801946, 8.4468407224 1 Haltestelle_und_Bedienpunkt
24 3304 Kemptthal 0.0 0.0 0.0 0.0 0.0 NaN 0.0 0.0 47.452833265, 8.70557069755 1 Haltestelle_und_Bedienpunkt
25 3420 Lottstetten 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.6257356296, 8.56680664761 1 Haltestelle
26 3409 Bad Zurzach 0.0 0.0 1.0 1.0 1.0 NaN 0.0 1.0 47.5883101087, 8.29556465398 1 Haltestelle
27 3425 Feuerthalen 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.6921636376, 8.64595208918 1 Haltestelle
28 3421 Jestetten 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.6544006039, 8.57327389271 1 Haltestelle
29 3414 Mellikon 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.5684839744, 8.35249723256 1 Haltestelle
... ... ... ... ... ... ... ... ... ... ... ... ... ...
701 8005 Burgdorf 1.0 1.0 1.0 1.0 1.0 NaN 0.0 4.0 47.0606957305, 7.62168894507 1 Haltestelle_und_Bedienpunkt
702 6308 Arbon 0.0 0.0 1.0 1.0 1.0 NaN 0.0 2.0 47.5105854479, 9.43333858591 1 Haltestelle_und_Bedienpunkt
703 6217 Sulgen 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 47.5387993681, 9.18367857671 1 Haltestelle_und_Bedienpunkt
704 6316 Au SG 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.4361134139, 9.64124454757 1 Haltestelle_und_Bedienpunkt
705 6304 Mörschwil 0.0 0.0 1.0 1.0 0.0 NaN 0.0 1.0 47.4747707737, 9.41437284119 1 Haltestelle
706 6309 Egnach 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.5439914495, 9.38300007743 1 Haltestelle
707 9000 Chur 1.0 1.0 1.0 1.0 1.0 Postautostation per Rolltreppe und Lift erreic... 0.0 6.0 46.8530797552, 9.52892561961 1 Haltestelle_und_Bedienpunkt
708 8217 Schachen LU 0.0 0.0 0.0 0.0 1.0 keine schienenfreien Zugänge 0.0 0.0 47.0379660567, 8.1432466759 1 Haltestelle_und_Bedienpunkt
709 8100 Langenthal 1.0 1.0 1.0 0.0 1.0 NaN 0.0 3.0 47.2173003777, 7.78470885276 1 Haltestelle_und_Bedienpunkt
710 8200 Worb SBB 0.0 0.0 0.0 0.0 0.0 NaN 0.0 0.0 46.9152218276, 7.56483999982 1 Haltestelle_und_Bedienpunkt
711 8208 Trubschachen 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 46.9216924283, 7.84613113265 1 Haltestelle
712 8213 Entlebuch 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 46.9936910245, 8.06235072562 1 Haltestelle
713 8695 Grasswil, Post NaN NaN NaN NaN NaN NaN NaN NaN 47.1460754455, 7.66716135321 1 Haltestelle
714 9004 Bad Ragaz 0.0 1.0 1.0 1.0 1.0 Postautos fahren ab Bahnhofplatz 0.0 1.0 47.0103066077, 9.50521579767 1 Haltestelle
715 9413 Flums 0.0 1.0 1.0 0.0 0.0 NaN 0.0 1.0 47.0966128468, 9.34791662857 1 Haltestelle_und_Bedienpunkt
716 16218 Winterthur Hegi 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.5015644748, 8.76930571536 1 Haltestelle
717 9405 Räfis-Burgerau 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.1499462602, 9.48516673222 1 Haltestelle
718 15992 Baar Neufeld 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.1884876743, 8.51775897551 1 Haltestelle
719 9415 Mols 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 47.1129874927, 9.27680343664 1 Haltestelle
720 9852 Obstalden, Post NaN NaN NaN NaN NaN NaN NaN NaN 47.1175812114, 9.14946758658 1 Haltestelle
721 6139 Stein am Rhein 0.0 0.0 1.0 0.0 1.0 Gleis 3 Unterführung, steile Rampe 0.0 2.0 47.656108874, 8.85500693112 1 Haltestelle
722 6209 Flawil 1.0 1.0 1.0 1.0 1.0 NaN 0.0 2.0 47.4151898192, 9.1897661689 1 Haltestelle_und_Bedienpunkt
723 6046 Henggart 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.5642523105, 8.68505196166 1 Haltestelle_und_Bedienpunkt
724 6044 Winterthur Töss 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.4898075094, 8.70929159585 1 Haltestelle
725 6009 Saland 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.3942126094, 8.85420315671 1 Haltestelle_und_Bedienpunkt
726 6017 Wiesendangen 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.5255401974, 8.77601496118 1 Haltestelle
727 6021 Dinhard 0.0 0.0 0.0 0.0 1.0 NaN 0.0 0.0 47.5533468989, 8.75295793686 1 Haltestelle
728 5204 Faido 0.0 0.0 0.0 0.0 0.0 NaN 0.0 1.0 46.48307671, 8.79070214577 1 Haltestelle
729 6027 Ramsen NaN NaN NaN NaN NaN NaN NaN NaN 47.707435847, 8.8211461179 1 Haltestelle
730 16271 Steinach 0.0 0.0 0.0 0.0 1.0 NaN 0.0 1.0 47.5008611902, 9.44212099652 1 Haltestelle

731 rows × 13 columns