Assuming that I have the next data frame:

flag | price
----------------------
1    |47.808764653746
1    |47.808764653746
1    |31.9869279512204
1    |47.7907893713564
1    |16.7599200038239
1    |16.7599200038239
1    |20.3916014172137

How can I create a data frame with an extra indexed column as the next one:

flag | price          | index
----------------------|-------
1    |47.808764653746 | 0
1    |47.808764653746 | 1
1    |31.9869279512204| 2
1    |47.7907893713564| 3
1    |16.7599200038239| 4
1    |16.7599200038239| 5
1    |20.3916014172137| 6

-- 
Cesar Flores

Reply via email to