Python Forum
question on pandas datareader
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question on pandas datareader
#1
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=Iqjy9UqK...6b0aDrrKyL-

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
Reply
#2
(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: done
See 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>
Reply
#3
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
Reply
#4
(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 idlelib
But 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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas df inside a df question mbaker_wv 4 1,152 Dec-25-2022, 01:11 AM
Last Post: mbaker_wv
  Pandas usecols question rsearing 1 1,218 Aug-20-2022, 10:10 PM
Last Post: jefsummers
  Simple pandas question mcva 4 2,607 Dec-17-2021, 04:47 PM
Last Post: mcva
  Pandas question new2datasci 0 1,928 Jan-10-2021, 01:29 AM
Last Post: new2datasci
  Pandas merge question smw10c 2 5,674 Jul-02-2020, 06:56 PM
Last Post: hussainmujtaba
  Counting Criteria in Pandas Question Koenig 1 2,134 Sep-30-2019, 05:16 AM
Last Post: perfringo
  pandas DataReader error on all data sources glidecode 5 18,057 Sep-25-2019, 02:10 PM
Last Post: perfringo
  Function question using Pandas smw10c 7 7,011 Feb-12-2019, 06:52 PM
Last Post: Nathandsn
  Simple pandas dataframe question popohoma 1 3,493 Jan-03-2019, 05:00 PM
Last Post: ashlardev
  unable to locate package - pandas datareader Grin 3 6,202 Apr-12-2018, 11:43 AM
Last Post: Grin

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020