AttributeError: 'dict' object has no attribute 'plot'
- Ngôn ngữ chính
- Python
- Star
- 734
- Fork
- 412
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
from iexfinance import Stock
import matplotlib.pyplot as plt
tsla = Stock('TSLA')
tsla.get_close()
tsla.get_price()
from iexfinance import get_historical_data
from datetime import datetime
import pandas as pd
pd.set_option('display.max_rows', 1000)
start = datetime(2017, 2, 9)
end = datetime(2017, 5, 24)
df = get_historical_data("TSLA", start=start, end=end, output_format='json')
df.plot()
plt.show()
I keep getting the following error and I am not sure what am i doing wrong
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in ()
8
9 df = get_historical_data("TSLA", start=start, end=end, output_format='json')
---> 10 df.plot()
11 plt.show()
12 df
AttributeError: 'dict' object has no attribute 'plot'
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.