I have a dataframe like the following. I would like to get the index value by checking the date. For example if the date is 2018-04-05, I need to get the index value as 3. Can someone let me know how to do that?
close date high low open volume
0 1536.95 2018-04-02 09:15:00+05:30 1545.00 1509.40 1509.40 420761
1 1554.80 2018-04-03 09:15:00+05:30 1562.00 1534.00 1534.00 201412
2 1530.00 2018-04-04 09:15:00+05:30 1576.85 1525.85 1554.00 171614
3 1552.35 2018-04-05 09:15:00+05:30 1559.70 1536.90 1551.40 198303
4 1553.25 2018-04-06 09:15:00+05:30 1560.95 1542.85 1558.00 119196
5 1541.30 2018-04-09 09:15:00+05:30 1559.15 1535.65 1552.90 175732
6 1539.15 2018-04-10 09:15:00+05:30 1555.90 1531.45 1555.90 112086
7 1533.55 2018-04-11 09:15:00+05:30 1543.50 1520.10 1531.90 319761