Home > OS >  Select index pandas Series by a specific value
Select index pandas Series by a specific value

Time:11-27

I have this:

Wochentag
Mo    1083
Di     913
Mi    1125
Do    1797
Fr    2129
Name: Besucher, dtype: int64

I just want to select the "Di" because 913 is the lowest number. Therefore I tried:

df.loc[df.min()] - but I always get an error

CodePudding user response:

Use Series.idxmin:

df['Besucher'].idxmin()
  • Related