pandas.DataFrame.size() function with example program in python
DataFrame.size(): This function return an int representing the number of elements in this object.
Return the number of rows if Series. Otherwise return the number of rows times number of columns if DataFrame.
#example program on pandas.DataFrame.size() function
import pandas as pd
d = {'exp': [1, 2,3], 'salary': [10000, 15000,20000]}
df = pd.DataFrame(data=d)
print(df.size)
Output:
6