In this section, we will learn about when and where to use the axis parameter or keyword while doing data analysis in pandas. We'll introduce the axis parameter, and will walk through various values to which the axis keyword can be set to. We will demonstrate how setting axis to rows or columns changes a method's behavior. We'll also show a few code examples for using the axis keyword.
We will start by importing the pandas module and reading the dataset of house prices from zillow.com into the Jupyter Notebook:
data = pd.read_table('data-zillow.csv', sep=',')data.head()
The following is the output: