What does df.shape return for a pandas DataFrame?

Data Science with Python Easy

Data Science with Python — Easy

What does df.shape return for a pandas DataFrame?

Key points

  • df.shape provides the size of the DataFrame in terms of rows and columns.
  • It is useful for understanding the structure of your data.
  • This method does not return data types, memory usage, or non-null values.

Ready to go further?

Related questions