Now that we've discussed how to query and merge DataFrame objects, let's learn how to perform complex operations on our dataframes to create and modify columns and rows. We will begin with a review of operations that summarize entire rows and columns before moving on to binning, imposing threshold limits on the data, applying functions across rows and columns, and window calculations, which summarize data along a certain number of observations at a time (like moving averages).
For this section, we will be working in the 2-dataframe_operations.ipynb notebook and using weather data, along with Facebook stock's volume traded and opening, high, low, and closing prices daily for 2018. Let's import what we will need and read in the data:
>>> import numpy as np
>>> import pandas as pd
>>> weather = pd.read_csv(
... ...