pandas-datareader

How to show a pandas dataframe into a existing flask html table?

穿精又带淫゛_ 提交于 2019-11-27 10:36:23
问题 This may sound a noob question, but I'm stuck with it as Python is not one of my best languages. I have a html page with a table inside it, and I would like to show a pandas dataframe in it. What is the best way to do it? Use pandasdataframe.to_html? py from flask import Flask; import pandas as pd; from pandas import DataFrame, read_csv; file = r'C:\Users\myuser\Desktop\Test.csv' df = pd.read_csv(file) df.to_html(header="true", table_id="table") html <div class="table_entrances" style=

Yahoo Finance API / URL not working: Python fix for Pandas DataReader

南楼画角 提交于 2019-11-27 03:38:03
问题 Yahoo Finance URL has not been accessible using the Pandas DataReader's "yahoo" method since 16 May 2017. I have yet to test this fix-yahoo-finance: https://pypi.python.org/pypi/fix-yahoo-finance that was posted just yesterday, with the statement: "Yahoo! finance has decommissioned their historical data API". EDIT August 2, 2017: I have since followed the steps in https://pypi.python.org/pypi/fix-yahoo-finance to: $ pip3 install fix_yahoo_finance --upgrade --no-cache-dir, upgraded pandas

Downloading mutliple stocks at once from yahoo finance python

和自甴很熟 提交于 2019-11-27 03:29:17
问题 I have a question about the function of yahoo finance using the pandas data reader. I'm using for months now a list with stock tickers and execute it in the following lines: import pandas_datareader as pdr import datetime stocks = ["stock1","stock2",....] start = datetime.datetime(2012,5,31) end = datetime.datetime(2018,3,1) f = pdr.DataReader(stocks, 'yahoo',start,end) Since yesterday i get the error "IndexError: list index out of range", which appears only if I try to get multiple stocks.

import pandas_datareader gives ImportError: cannot import name 'is_list_like'

守給你的承諾、 提交于 2019-11-27 00:30:48
I am working in a virtual environment. I am able to import and work in pandas without any error but when I am trying to import pandas_datareader import pandas as pd import numpy as np import matplotlib.pyplot as plt import datetime as dt from matplotlib import style import pandas_datareader as web it is giving following error - Traceback (most recent call last): File "stock.py", line 6, in <module> import pandas_datareader as web File "/home/xxxxx/django-apps/env/lib/python3.5/site-packages/pandas_datareader/__init__.py", line 2, in <module> from .data import (DataReader, Options, get

import pandas_datareader gives ImportError: cannot import name &#39;is_list_like&#39;

谁说胖子不能爱 提交于 2019-11-26 09:22:35
问题 I am working in a virtual environment. I am able to import and work in pandas without any error but when I am trying to import pandas_datareader import pandas as pd import numpy as np import matplotlib.pyplot as plt import datetime as dt from matplotlib import style import pandas_datareader as web it is giving following error - Traceback (most recent call last): File \"stock.py\", line 6, in <module> import pandas_datareader as web File \"/home/xxxxx/django-apps/env/lib/python3.5/site