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

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -