Python Forum
Import Library but Download first?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import Library but Download first?
#7
Thanks Larz60+, snippsat & buran for your help.

I'm using Anaconda & have found that I have installed pandas & matplotlib.

While practising, with the below code, I found that I have also been able to import them to use.

I do however, get an error about pandas_datareader.

I'm using Python 3.7, is pandas_datareader correct as a library to import??

ModuleNotFoundError: No module named 'pandas_datareader'

import datetime as dt
import matplotlib.pyplot as plt  # shows yellow triangle "Imported but unused"
from matplotlib import style
import pandas as pd              # shows yellow triangle "Imported but unused"
import pandas_datareader.data as web

style.use('ggplot')

start = dt.datetime(2000,1,1)
end = dt.datetime(2016,12,31)

df = web.DataReader('TSLA', 'yahoo', start, end)
print(df.head(4))
Reply


Messages In This Thread
Import Library but Download first? - by OscarBoots - Feb-01-2019, 10:10 AM
RE: Import Library but Download first? - by Larz60+ - Feb-01-2019, 10:20 AM
RE: Import Library but Download first? - by Larz60+ - Feb-01-2019, 12:07 PM
RE: Import Library but Download first? - by buran - Feb-01-2019, 01:00 PM
RE: Import Library but Download first? - by OscarBoots - Feb-02-2019, 04:50 AM
RE: Import Library but Download first? - by buran - Feb-02-2019, 06:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,993 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  download with internet download manager coral_raha 0 3,126 Jul-18-2021, 03:11 PM
Last Post: coral_raha
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,352 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  Regarding import library in two different program file Rohit 3 2,625 Jan-22-2020, 07:14 AM
Last Post: buran
  sys library and how to import using conda michavardy 0 2,560 Feb-26-2019, 08:25 AM
Last Post: michavardy
  Do you know how to import Python Standard Library sylas 30 14,790 Jan-26-2018, 01:32 PM
Last Post: metulburr
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,957 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

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