AI4Finance-Foundation / AI4Finance-Foundation/FinRL-Meta

FinRL_China_A_Share_Market.ipynb中运行plotter.plot()报错

Aperta
#281 0 commenti 1 reazione 2 assegnatari Rivendicata da @zhumingpassional Vedi su GitHub
bug
Lingua principale
Python
Stelle
1.9k
Fork
751
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

AttributeError Traceback (most recent call last)
Input In [23], in ()
1 get_ipython().run_line_magic('matplotlib', 'inline')
----> 2 plotter.plot()

File ~/autodl-tmp/FinRL-Meta/meta/data_processors/tushare.py:220, in ReturnPlotter.plot(self, baseline_ticket)
216 days_per_tick = (
217 60 # you should scale this variable accroding to the total trading days
218 )
219 time = list(range(len(ours)))
--> 220 datetimes = self.df_account_value.time.tolist()
221 ticks = [tick for t, tick in zip(time, datetimes) if t % days_per_tick == 0]
222 plt.title("Cumulative Returns")

File ~/miniconda3/lib/python3.8/site-packages/pandas/core/generic.py:5902, in NDFrame.__getattr__(self, name)
5895 if (
5896 name not in self._internal_names_set
5897 and name not in self._metadata
5898 and name not in self._accessors
5899 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5900 ):
5901 return self[name]
-> 5902 return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'time'

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.