Now that we have imported the automobile fuel efficiency dataset into Jupyter and witnessed the power of pandas, the next step is to replicate the preliminary analysis performed in R from the earlier chapter, getting your feet wet with some basic Pandas functionality.
We will continue to grow and develop the Jupyer Notebook that we started in the previous recipe. If you've completed the previous recipe, you should have everything you need to continue.
- First, let's find out how many observations (rows) are in our data using the following command:
In [8]: len(vehicles)
...:
Out[8]: 38120
If you switch back and forth between R and Python, remember that in R, the function is length
and in Python, it is len
.
- Next, let's find out how many variables (columns) are in our data using the following command:
In [9]: len(vehicles.columns)
...:
Out[9]: 83
Let's get a list of the names of the columns using the...