DataFrame.shape() : This function return a tuple representing the dimensionality of the DataFrame.
#example program on DataFrame.shape() function.
import pandas as pd
d = {'exp': [1, 2], 'salary': [10000, 15000]}
df = pd.DataFrame(data=d)
print(df.shape)
Output:
(2, 2)