pandas.DataFrame.shape() function with example in python

Spread the love

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)

 

admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *