Path: blob/master/lessons/lesson_12/python-notebooks-data-wrangling/Wrangling -- Intro to pandas.DataFrames.ipynb
1904 views
Kernel: Python 3
In [16]:
In [17]:
In [18]:
Out[18]:
Subsetting columns with the iloc
attribute
iloc
provides a way to slice a range of rows of a dataframe. Note the indexes are preserved:
In [19]:
Out[19]:
In [ ]:
Select columns
Just pass in a list of column names
In [20]:
Out[20]:
Adding a derived column
Add a decade column
In [24]:
Out[24]:
Add change over year for the co2_ppm_mean
Grouping
In [ ]: