ReFreeman
ReFreeman

Reputation: 33

Select index pandas Series by a specific value

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

Upvotes: 1

Views: 163

Answers (1)

jezrael
jezrael

Reputation: 862671

Use Series.idxmin:

df['Besucher'].idxmin()

Upvotes: 1

Related Questions