Search code examples
pythonpandasvisual-studio-2010visual-studio-codepandas-datareader

How can I import pandas_datareader


  • I just downloaded Visual Studio Code, and I´m having troubles with importing the library in the newest version of the software.
  • I hope someone can give me an instruction step by step.
  • NOTE: I'm using python as my coding language

Solution

    • The following instructions are for versions of packages current as of this writing.
    • pandas-datareader documentation
    • The module is not part of pandas and must be installed separately
    • Use the directions at Python in Visual Studio Code to properly configure VS Code to work with your python interpreter.

    pip

    pip install pandas-datareader
    

    conda

    # at the anaconda prompt
    conda install -c anaconda pandas-datareader
    

    Usage

    import pandas_datareader as pdr
    

    Note

    • For older versions of ipython (e.g. 3.x, which is from before 2015-08), !pip install pandas-datareader or %pip ... may work (mentioned in a comment).