1 year ago
#386575
PetersServers
Pandas Dataframe rename
Hello coding friends :),
I'm trying to only rename a specifiy column in my Gold dataframe (pandas) with this command:
BTC = yf.download(tickers='BTC-USD', period="16wk", interval='1d')
SaP = yf.download('SPY', period="16wk", interval="1d")
Gold = yf.download('GC=F', period="16wk", interval="1d")
Gold = Gold.rename(columns={'Open':'Gold'}, inplace=True)
print(type(Gold))
unfortunately the Dataframe type is empty after renaming it, and the type is None althought the column 'Open' is present in the dataframe
What am I missing here?
Does someone know how to do it right?
Thank you all :)
Peter
python
pandas
rename
0 Answers
Your Answer