How can I find the index of the 3 smallest and 3 largest values in a column in my pandas dataframe? I saw ways to find max and min, but none to get the 3.
What have you tried? You could sort with s.sort() and then call s.head(3).index and s.tail(3).index.
s.sort()
s.head(3).index
s.tail(3).index