How to do it...

First, some metadata on the college dataset will be collected, followed by basic summary statistics of each column:

  1. Read in the dataset, and view the first five rows with the head method:
>>> college = pd.read_college('data/college.csv')>>> college.head()
  1. Get the dimensions of the DataFrame with the shape attribute:
>>> college.shape>>> (7535, 27)
  1. List the data type of each column, number of non-missing values, and memory usage with the info method:
>>> college.info()
  1. Get summary statistics for the numerical columns and ...

Get Pandas Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.