ipython / ipython/ipykernel

AttributeError: 'dict' object has no attribute 'plot'

Open
#333 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.