1

I'm having trouble selecting specific values of a row with pandas. I have a CSV file with confirmed cases of Coronavirus in each country each day. So obviously some countries started having cases in different days and progressed in different ways.

Dataframe of countries I'm trying to plot: enter image description here

I would like to filter each row since de 50th confirmed case, which occurs on different days for each country. I tried to use the command df[df['column']>50], but this works for a single column and I want to do for all columns.

All my life I worked just with procedural programming in python without libraries but this week I decided to start using some of them, so my library understanding is very limited and I don't know how to insert a for loop on a library function, which I think is the case here. This is also my first question on stack overflow, so if I am doing something wrong please tell me. Thank you!

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
anormallol
  • 11
  • 1
  • 1
    u probably need to create a temp column and use cumcount. it would be helpful though if u post a sample dataframe with expected output. use this as a guide : [link](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – sammywemmy Mar 25 '20 at 02:08

0 Answers0