Try this:
df = df.set_index('Date')
Or you could do inplace
like:
df.set_index('Date', inplace=True)
Then:
print(df)
Would give:
Open High Low Close Adj Close Volume
Date
2020-01-22 167.399994 167.490005 165.679993 165.699997 163.963043 24138800
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…