Pandas > Print dataframe shape

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,100,size=(5, 4)), columns=['C1','C2','C3','C4'])
print ("dataframe")
print (dataframe)
shape = dataframe.shape
print ("dataframe shape")
print (shape)
print ("shape axis 0")
print (shape[0])
print ("shape axis 1")
print (shape[1])
dataframe
   C1  C2  C3  C4
0  20   7  74  62
1  40  70  16  12
2  48  34  42  98
3  66  86  41  74
4  79  33   7  56
dataframe shape
(5, 4)
shape axis 0
5
shape axis 1
4