ipython / ipython/ipykernel

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

Aperta
#333 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
734
Fork
412
Merge medio
1g 5h
PR unite (30g)
8

Descrizione

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'

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.