The pandas DataFrame
Before diving deep into pandas, it is worth knowing the components of the DataFrame. Visually, the outputted display of a pandas DataFrame (in a Jupyter Notebook) appears to be nothing more than an ordinary table of data consisting of rows and columns. Hiding beneath the surface are the three components—the index, columns, and data that you must be aware of to maximize the DataFrame's full potential.
This recipe reads in the movie dataset into a pandas DataFrame and provides a labeled diagram of all its major components.
>>> movies = pd.read_csv("data/movie.csv")
>>> movies
color direc/_name ... aspec/ratio movie/likes
0 Color James Cameron ... 1.78 33000
1 Color Gore Verbinski ... 2.35 0
2 Color Sam Mendes ... 2.35 85000
3 Color Christopher Nolan ... 2.35 164000
4 NaN Doug Walker .....