print(df.shape)
# (891, 12)
print(df.shape[0])
# 891
print(df.shape[1])
# 12
df.shape
# The shape attribute returns a tuple (TODO appendix) where the first value is
#the number of rows and the second number is the number of columns
print(df.shape)
(1704, 6)
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.shape
(2, 2)
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4],
... 'col3': [5, 6]})
>>> df.shape
(2, 3)