pandas python how to count the number of records or rows in a dataframe
To get the number of rows in a dataframe use: df.shape[0] (and df.shape[1] to get the number of columns). As an alternative you can use len(df) or len(df.index) (and len(df.columns) for the columns) shape is more versatile and more convenient than len(), especially for interactive work (just needs to be added at the end), but … Read more