as I am trying to print financial data:
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
import pandas as pd
import pandas_datareader.data as web
import numpy as np
style.use('ggplot')
start=dt.datetime(2000,1,1)
end=dt.datetime(2016,12,31)
df= web.DataReader('ERIE', 'google', start, end)
print(df.head())
I get the error that df does not exist, or more specifically:
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
print(df.head(5))
File "C:\Python34\lib\site-packages\pandas\core\base.py", line 51, in __str__
return self.__unicode__()
File "C:\Python34\lib\site-packages\pandas\core\frame.py", line 582, in __unicode__
width, _ = console.get_console_size()
File "C:\Python34\lib\site-packages\pandas\io\formats\console.py", line 77, in get_console_size
terminal_width, terminal_height = get_terminal_size()
File "C:\Python34\lib\site-packages\pandas\io\formats\terminal.py", line 33, in get_terminal_size
return shutil.get_terminal_size()
File "C:\Python34\lib\shutil.py", line 1071, in get_terminal_size
size = os.get_terminal_size(sys.__stdout__.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'
I have no clue how to fix this, as this code seems to be working with everyone else who is trying it. I am just a beginner, so any help would be really appreciated. Thank you! Greetings, Tristan