Categories
Python Answers

How to get the row count of a Python Pandas DataFrame?

Spread the love

To get the row count of a Python Pandas DataFrame, we can use various properties.

We can write one of

  • len(df.index)
  • df.shape[0]
  • df[df.columns[0]].count()

to get the row count of a Pandas dataframe.

df is the dataframe.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.