print the numbers of rows and columns of your dataframe in python
To print the number of rows and columns of a DataFrame in Python using Pandas, you can use the shape attribute.
main.py
import pandas as pd
# create an example dataframedf = pd.DataFrame({'col1': [1, 2, 3], 'col2': ['a', 'b', 'c']})
# print the number of rows and columnsprint('Number of rows:', df.shape[0])
print('Number of columns:', df.shape[1])