question on pandas datareader - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: question on pandas datareader (/thread-8075.html) |
question on pandas datareader - kit12_31 - Feb-05-2018 Hi guys, ive started learning python for data analysis purpose. so ive downloaded activestate (activepython 3.5.3 with a matplotlib/pandas... and lots of other packages just so that i dont need to download them individually) so i tried to follow this fella's tutorial https://www.youtube.com/watch?v=Iqjy9UqKKuo&list=PLQVvvaa0QuDc-3szzjeP6N6b0aDrrKyL- however when i got to import pandas_datareader.data as web, an error came up > import pandas as pd >>> import datetime >>> import pandas_datareader.data as web Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> import pandas_datareader.data as web File "/Users/Kit/Downloads/pandas-datareader-0.6.0/pandas_datareader/__init__.py", line 2, in <module> from .data import (DataReader, Options, get_components_yahoo, File "/Users/Kit/Downloads/pandas-datareader-0.6.0/pandas_datareader/data.py", line 7, in <module> from pandas_datareader.bankofcanada import BankOfCanadaReader File "/Users/Kit/Downloads/pandas-datareader-0.6.0/pandas_datareader/bankofcanada.py", line 5, in <module> from pandas_datareader.base import _BaseReader File "/Users/Kit/Downloads/pandas-datareader-0.6.0/pandas_datareader/base.py", line 13, in <module> from pandas_datareader._utils import (RemoteDataError, SymbolWarning, File "/Users/Kit/Downloads/pandas-datareader-0.6.0/pandas_datareader/_utils.py", line 6, in <module> from requests_file import FileAdapter ImportError: No module named 'requests_file' >>> Does that mean i havent installed the pandas reader properly? i downloadeded pandas-datareader-0.6.0.tar.gz (md5) from https://pypi.python.org/pypi/pandas-datareader and extracted the files and ran the set up in IDLE and it seems the IDLE has restarted Sorry for the stupid question Many thanks RE: question on pandas datareader - snippsat - Feb-05-2018 (Feb-05-2018, 07:35 PM)kit12_31 Wrote: so ive downloaded activestate (activepython 3.5.3 with a matplotlib/pandas... and lots of other packages just so that i dont need to download them individually)You should have chosen Anaconda Python 3.6,it's much better and has own package manger conda. My tutorial about Anaconda G:\Anaconda3\Scripts λ conda install pandas-datareader Solving environment: done The following packages will be downloaded: package | build ---------------------------|----------------- requests-ftp-0.3.1 | py36_0 13 KB requests-file-1.4.1 | py36_0 6 KB pandas-datareader-0.5.0 | py36_0 102 KB ------------------------------------------------------------ Total: 122 KB The following NEW packages will be INSTALLED: pandas-datareader: 0.5.0-py36_0 requests-file: 1.4.1-py36_0 requests-ftp: 0.3.1-py36_0 The following packages will be UPDATED: Downloading and Extracting Packages requests-ftp 0.3.1: ################################################################################## | 100% requests-file 1.4.1: ################################################################################# | 100% pandas-datareader 0.5.0: ############################################################################# | 100% Preparing transaction: done Verifying transaction: done Executing transaction: doneSee that it find all pagages,what you are missing is requests-file In Activestate you use pip pip install requests_file Test that it work: G:\Anaconda3 λ python -m ptpython >>> import pandas_datareader.data as web >>> web.get_data_google <function get_data_google at 0x000002DA93230598> RE: question on pandas datareader - kit12_31 - Feb-05-2018 thank you so much snippsat!! downloaded anaconda and just play around with jupyter however another question came into my head. i have typed python in my terminal and it came up with python 3.6 the anaconda version So i wanted to use idle for coding, i went into terminal and typed IDLE, however the idle pop up is the built in python 2.7 came with the MacOS and my question is how do i change my default idle to anaconda python 3.6? I googled it and told me to change the bash profile, tried that and maybe i did it wrong and now i cant get access to it: as follows: Kits-MacBook-Air:~ Kit$ > open ~/.bash_profile -bash: /Users/Kit/.bash_profile: Permission denied many thanks again RE: question on pandas datareader - snippsat - Feb-05-2018 (Feb-05-2018, 10:02 PM)kit12_31 Wrote: how do i change my default idle to anaconda python 3.6?From command line : python -m idlelib # Or python3 -m idlelibBut that's not good at all,better REPL ptpython or Ipython I use ptpython a review and VS code(free for all OS) my review. |