import pandas as pd import numpy as np
raw_data = {'name': ['Willard Morris', 'Al Jennings', 'Omar Mullins', 'Spencer McDaniel'], 'age': [20, 19, 22, 21], 'favorite_color': ['blue', 'red', 'yellow', "green"], 'grade': [88, 92, 95, 70]} df = pd.DataFrame(raw_data, columns = ['name', 'age', 'favorite_color', 'grade']) df
df.shape
(4, 4)
Format is (# rows, # cols), so there are both 4 rows and 4 columns in our example df.