Course Name: Deep Reinforcement Learning in Trading, Section No: 11, Unit No: 8, Unit type: Notebook
Hi, the function get_last_N_timebars throws this error:
TypeError: Cannot compare tz-naive and tz-aware datetime-like objects
Can you help fixing it please?
Hi Israel,
This error is due to a different pandas version on your local system. I tried running the code on the quantra environment with pandas version 1.2.4 and was able to run the code without any error. If you are working with any other pandas version, you can install the pandas 1.2.4 version using the following line of code.
!pip install pandas==1.2.4
Hope this helps!