Python Pandas: Get index from column value -


very simple question: have pandas dataframe. 1 of columns looks this.

date 2016-04-15 2016-04-14 2016-04-13 2016-04-12  2016-04-11 2016-04-08 

how index of particular value assuming values unique.

for example, "2016-04-13" return 2

use df.index.get_loc('2016-04-14') integer location requested label. return 1 intital starts 0. can add 1 index value 2


Comments

Popular posts from this blog

c# - Class in a list -

mysql - Django database model for my website -

ios - How to run a segue on itself OR another viewController -