Pandas. Get the index (row index) of the element location according to the condition in the dataframe
編輯:Python
Pandas.DataFrame Get the location of the element according to the condition in index( Row index )
1、 background
In many cases , We want to calculate the value of a column in a specified row , To index the value of another column in that row , For example, the following table :
We want to Type The value in the column Watermelon, obtain Watermelon Row index value of (index), So as to locate quickly Watermelon Line in Price Values in columns .