Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dykw666 opened this issue Mar 21, 2023 · 0 comments
Open

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

dykw666 opened this issue Mar 21, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dykw666
Copy link

dykw666 commented Mar 21, 2023

AttributeError Traceback (most recent call last)
Input In [23], in <cell line: 2>()
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'

@YangletLiu YangletLiu added the bug Something isn't working label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants