pandas-datareader

No module named 'pandas_datareader' in Jupyter (Anaconda) after I run pip3 install pandas_datareader

▼魔方 西西 提交于 2021-02-09 09:21:50
问题 I am trying to learn pandas and want to load some stocks data. I was following a course which advised me to load pandas.io.data, but this did not work as io.data was depreciated. So I decided to use pandas-datareader instead. But I am struggling to instal it on mac in Anaconda (Jupiter notebook). First time I run import pandas_datareader as pdweb I got ModuleNotFoundError: No module named 'pandas_datareader'. Not surprising as I never used this before so I run pip3 install pandas_datareader

No module named 'pandas_datareader' in Jupyter (Anaconda) after I run pip3 install pandas_datareader

随声附和 提交于 2021-02-09 09:21:31
问题 I am trying to learn pandas and want to load some stocks data. I was following a course which advised me to load pandas.io.data, but this did not work as io.data was depreciated. So I decided to use pandas-datareader instead. But I am struggling to instal it on mac in Anaconda (Jupiter notebook). First time I run import pandas_datareader as pdweb I got ModuleNotFoundError: No module named 'pandas_datareader'. Not surprising as I never used this before so I run pip3 install pandas_datareader

No module named 'pandas_datareader' in Jupyter (Anaconda) after I run pip3 install pandas_datareader

感情迁移 提交于 2021-02-09 09:21:10
问题 I am trying to learn pandas and want to load some stocks data. I was following a course which advised me to load pandas.io.data, but this did not work as io.data was depreciated. So I decided to use pandas-datareader instead. But I am struggling to instal it on mac in Anaconda (Jupiter notebook). First time I run import pandas_datareader as pdweb I got ModuleNotFoundError: No module named 'pandas_datareader'. Not surprising as I never used this before so I run pip3 install pandas_datareader

Error in reading stock data : 'DatetimeProperties' object has no attribute 'weekday_name' and 'NoneType' object has no attribute 'to_csv'

放肆的年华 提交于 2021-02-07 13:45:37
问题 I tried running the code to get stock data but it fails, showing the following error: 'DatetimeProperties' object has no attribute 'weekday_name' 'NoneType' object has no attribute 'to_csv' from pandas_datareader import data as web import os import pandas as pd from pandas.testing import assert_frame_equal def get_stock(ticker, start_date, end_date, s_window, l_window): try: df = web.get_data_yahoo(ticker, start=start_date, end=end_date) df['Return'] = df['Adj Close'].pct_change() df['Return'

Error in reading stock data : 'DatetimeProperties' object has no attribute 'weekday_name' and 'NoneType' object has no attribute 'to_csv'

╄→гoц情女王★ 提交于 2021-02-07 13:44:36
问题 I tried running the code to get stock data but it fails, showing the following error: 'DatetimeProperties' object has no attribute 'weekday_name' 'NoneType' object has no attribute 'to_csv' from pandas_datareader import data as web import os import pandas as pd from pandas.testing import assert_frame_equal def get_stock(ticker, start_date, end_date, s_window, l_window): try: df = web.get_data_yahoo(ticker, start=start_date, end=end_date) df['Return'] = df['Adj Close'].pct_change() df['Return'

How to fix “ImportError: cannot import name 'StringIO'”

旧时模样 提交于 2021-02-07 12:40:43
问题 python version is 3.6.6 and pandas_datareader version is 0.7.0 when i import pandas_datareader, an error occurs like below. C:\PycharmProjects\Demo\venv\Scripts\python.exe C:/PycharmProjects/Demo/stock.py Traceback (most recent call last): File "C:/PycharmProjects/Demo/stock.py", line 3, in <module> import pandas_datareader as wb File "C:\PycharmProjects\Demo\venv\lib\site-packages\pandas_datareader\__init__.py", line 2, in <module> from .data import (DataReader, Options, get_components_yahoo

How to fix “ImportError: cannot import name 'StringIO'”

☆樱花仙子☆ 提交于 2021-02-07 12:40:11
问题 python version is 3.6.6 and pandas_datareader version is 0.7.0 when i import pandas_datareader, an error occurs like below. C:\PycharmProjects\Demo\venv\Scripts\python.exe C:/PycharmProjects/Demo/stock.py Traceback (most recent call last): File "C:/PycharmProjects/Demo/stock.py", line 3, in <module> import pandas_datareader as wb File "C:\PycharmProjects\Demo\venv\lib\site-packages\pandas_datareader\__init__.py", line 2, in <module> from .data import (DataReader, Options, get_components_yahoo

Prevent conda from automatically downgrading python package

不羁岁月 提交于 2021-01-29 10:04:37
问题 I had problems with pandas-datareader package v0.81. To fix my problem, I had to upgrade the package to a newer version 0.9 by running the following command; conda install -c anaconda pandas-datareader Unfortunately, when I tried to upgrade conda packages later using the command conda update --all , pandas-datareader is downgraded back to v0.81. v0.81 is from conda-forge channel. What I want is the v0.9 from anaconda channel. Below is what I want. https://anaconda.org/anaconda/pandas

How to fix ModuleNotFoundError: No module named 'pandas_datareader'

时光总嘲笑我的痴心妄想 提交于 2021-01-29 06:43:41
问题 ModuleNotFoundError: No module named 'pandas_datareader' Hello peeps, I need help with this ModuleNotFoundError: No module named 'pandas_datareader'. i have installed pandas_datareader more than 10x using pip install command but returns this error in both Pycharm and the default IDLE for python 3.7. I know there already a couple of threats on this forum addressing this issue, but non has helped me so far. Confession: I'm a newbie in python (40 hours experience so far)switching careers from

How to split Pandas string column into different rows?

安稳与你 提交于 2021-01-28 12:14:57
问题 Here is my issue. I have data like this: data = { 'name': ["Jack ;; Josh ;; John", "Apple ;; Fruit ;; Pear"], 'grade': [11, 12], 'color':['black', 'blue'] } df = pd.DataFrame(data) It looks like: name grade color 0 Jack ;; Josh ;; John 11 black 1 Apple ;; Fruit ;; Pear 12 blue I want it to look like: name age color 0 Jack 11 black 1 Josh 11 black 2 John 11 black 3 Apple 12 blue 4 Fruit 12 blue 5 Pear 12 blue So first I'd need to split name by using ";;" and then explode that list into