pandas find location of values greater than

Solutions on MaxInterview for pandas find location of values greater than by the best coders in the world

showing results for - "pandas find location of values greater than"
Cloé
12 Jan 2019
1#Find the index of values greater than 0 and put them in a list
2data.Dividends[data.Dividends>0].index.to_list()
3#To get the index along with its values we make the code shorter:
4data.Dividends[data.Dividends>0]