Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use Series.idxmin:

df['Besucher'].idxmin()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading