pythonpandasquandl

Dataframe index is not set properly in pandas/quandl


import pandas as pd
import quandl
df = pd.DataFrame(quandl.get('WIKI/GOOGL'))
print(df.head())

When I imported data from Quandl, this is how the data was imported as shown in the image.

But i don't want the date to be the index, instead, i want the index to be normal nos like 0, 1.... and so on

enter image description here


Solution

  • You might want to try this.

    df.reset_index(inplace=True)