July 2019
Beginner to intermediate
740 pages
16h 52m
English
So far, most of the actions we have taken on our data have been column-specific. When we want to run the same code on all the columns in our dataframe, we don't have to repeat ourselves—we can use the apply() method. Note that this will not be done in-place.
Let's calculate the Z-scores of the TMIN (minimum temperature), TMAX (maximum temperature), and PRCP (precipitation) observations in Central Park in October 2018. It's important that we don't try to take the Z-scores across the full year. NYC has four seasons, and what is considered normal weather will depend on which season we are in. By isolating our calculation to October, we can see if October had any days with very different weather:
>>> oct_weather_z_scores = ...
Read now
Unlock full access