AttributeError: 'dict' object has no attribute 'plot'
- Dominant language
- Python
- Stars
- 734
- Forks
- 412
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 8
Description
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'
Contributor guide
Assessment
This issue has not been assessed yet.