python - How to count result rows in pandas dataframe? -


i have pandas dataframe. want count number of rows satisfied condition.

data have 800 rows; data[data['cond'] == 1] return frame 343 rows. need store number of rows in variable. how can that?

iiuc, think can do:

a = len(data[data['cond'] == 1]) 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -