AI4Finance-Foundation / FinRL

FinRL: Financial Reinforcement Learning. 🔥
https://ai4finance.org
MIT License
9.39k stars 2.28k forks source link

AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'? #1081

Open Boreas813 opened 10 months ago

Boreas813 commented 10 months ago

https://github.com/AI4Finance-Foundation/FinRL-Tutorials/blob/master/2-Advance/FinRL_Ensemble_StockTrading_ICAIF_2020.ipynb In this tutorial, part 7 image you define a DataFrame called df_account_value and call append method ? df don't have append method at all.

mmmarchetti commented 10 months ago

As of pandas 2.0, append (previously deprecated) was removed.

You need to use concat instead (for most applications):

df_account_value = pd.concat([df_account_value, temp], ignore_index=True)

The tutorials are updated in the examples folder: https://github.com/AI4Finance-Foundation/FinRL/tree/master/examples

Boreas813 commented 10 months ago

As of pandas 2.0, append (previously deprecated) was removed.

You need to use concat instead (for most applications):

df_account_value = pd.concat([df_account_value, temp], ignore_index=True)

The tutorials are updated in the examples folder: https://github.com/AI4Finance-Foundation/FinRL/tree/master/examples

cool, can you update the link of this docs https://finrl.readthedocs.io/en/latest/tutorial/1-Introduction.html

YangletLiu commented 10 months ago

As of pandas 2.0, append (previously deprecated) was removed.

You need to use concat instead (for most applications):

df_account_value = pd.concat([df_account_value, temp], ignore_index=True)

The tutorials are updated in the examples folder: https://github.com/AI4Finance-Foundation/FinRL/tree/master/examples

Thanks!