LastAncientOne / Deep_Learning_Machine_Learning_Stock

Deep Learning and Machine Learning stocks represent promising opportunities for both long-term and short-term investors and traders.
MIT License
1.2k stars 314 forks source link

Need correction in cell 16 from '001_Pandas.ipynb' #5

Closed janetcheung-byte closed 2 years ago

janetcheung-byte commented 2 years ago

Below original first line of code doesn't work ⬇️ :

# Move column example
# Move Date in the first column

cols = list(new_df)
cols.insert(0, cols.pop(cols.index('Date')))
cols

Please correct this code to ⬇️ :

# Move column example
# Move Date in the first column
cols = new_df.columns.to_list()
cols.insert(0, cols.pop(cols.index('Date')))
cols
LastAncientOne commented 2 years ago

Hi. I will fix it and update. Thank you.