Select index pandas Series by a specific value

Advertisements

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

>Solution :

Use Series.idxmin:

df['Besucher'].idxmin()

Leave a ReplyCancel reply