Path: blob/master/lessons/lesson_12/coutries_of_the_world.ipynb
1904 views
Kernel: Python 3
In [68]:
In [45]:
In [46]:
Out[46]:
In [47]:
Out[47]:
Country object
Region object
Population int64
Area (sq. mi.) int64
Pop. Density (per sq. mi.) object
Coastline (coast/area ratio) object
Net migration object
Infant mortality (per 1000 births) object
GDP ($ per capita) float64
Literacy (%) object
Phones (per 1000) object
Arable (%) object
Crops (%) object
Other (%) object
Climate object
Birthrate object
Deathrate object
Agriculture object
Industry object
Service object
dtype: object
In [48]:
In [49]:
Out[49]:
Index(['Country', 'Region', 'Population', 'Area_(sq__mi_)',
'Pop__Density_(per_sq__mi_)', 'Coastline_(coast/area_ratio)',
'Net_migration', 'Infant_mortality_(per_1000_births)',
'GDP_($_per_capita)', 'Literacy_(%)', 'Phones_(per_1000)', 'Arable_(%)',
'Crops_(%)', 'Other_(%)', 'Climate', 'Birthrate', 'Deathrate',
'Agriculture', 'Industry', 'Service'],
dtype='object')
In [50]:
Out[50]:
['Country',
'Region',
'Population',
'Area_(sq__mi_)',
'Pop__Density_(per_sq__mi_)',
'Coastline_(coast/area_ratio)',
'Net_migration',
'Infant_mortality_(per_1000_births)',
'GDP_($_per_capita)',
'Literacy_(%)',
'Phones_(per_1000)',
'Arable_(%)',
'Crops_(%)',
'Other_(%)',
'Climate',
'Birthrate',
'Deathrate',
'Agriculture',
'Industry',
'Service']
In [51]:
Out[51]:
0 48,0
1 124,6
2 13,8
3 290,4
4 152,1
Name: Pop__Density_(per_sq__mi_), dtype: object
In [52]:
Out[52]:
In [55]:
Out[55]:
In [56]:
In [57]:
Out[57]:
In [ ]:
In [ ]:
In [ ]:
In [64]:
Out[64]:
number of missing data:
Country 0
Region 0
Population 0
Area (sq. mi.) 0
Pop. Density (per sq. mi.) 0
Coastline (coast/area ratio) 0
Net migration 3
Infant mortality (per 1000 births) 3
GDP ($ per capita) 1
Literacy (%) 18
Phones (per 1000) 4
Arable (%) 2
Crops (%) 2
Other (%) 2
Climate 22
Birthrate 3
Deathrate 4
Agriculture 15
Industry 16
Service 15
dtype: int64
In [65]:
Out[65]:
In [66]:
Out[66]:
/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py:194: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
self._setitem_with_indexer(indexer, value)
In [69]:
Out[69]:
In [70]:
Out[70]:
In [ ]: