In RL, Section11/7 i get: AttributeError: 'Index' object has no attribute 'tz_localize'

Course Name: Deep Reinforcement Learning in Trading, Section No: 11, Unit No: 7, Unit type: Notebook

 

AttributeError: 'Index' object has no attribute 'tz_localize'

Any idea how to correct it? This is from the native nb, so your module versions should be correct.

The version 1.4.4 is incompatible. If you get that install pandas 1.3.5, and those commands to force the cell to use it. Install line by line.
 
!pip install pandas==1.3.5
%conda install -c conda-forge pandas
import pandas as pd
pd. __version__
then you should get:

'1.3.5'

Hi Antoni,


The version 1.4.4 is incompatible. If you get that install pandas 1.3.5, and those commands to force the cell to use it. Install line by line.
 

Can you please specify the notebook where you are getting this error?

Thanks,
Akshay

Hi Antoni,



Thanks for pointing this out! Recently, there have been many updates in the yfinance library that are causing these issues. We need to upgrade to the latest version of the yfinance to resolve this. The notebook has been updated.



Thanks,

Akshay

Akshai, are you saying that now you have updated the nb and i do not need to force-use Pandas 1.3.5? 

Hi Antoni,



Yes. We have updated the notebook and added a yfinance upgrade statement before importing the library. 







This should allow you to run the notebook without any errors. Please do let us know if you still face any further issues.



Thanks,

Akshay