How to install and use pandas_datareader [Python]

In this article How to install and use pandas_datareader I will write.

What is pandas_datareader?

pandas_datareader is a Python library that can collect economic data and price data of financial products.

Since it has the name pandas, it seems that it will be included with pandas (like it used to be), but it is a different mon. It is not included in Anaconda, so I have to install it. Get data with the Python library pandas_datareader-Python, books, kids, chat and

Library ↓ pandas-datareader — pandas-datareader 0.9.0rc1+2.g427f658 documentation

Installation method

As mentioned above, pandas_datareader is a Python library. It is not included in Anaconda, so I will install it. Installation is done with pip.

pip install pandas_datareader

This completes the installation.

Example of usage

Try importing and using it to get the stock price. This time, let's take a look at the stock price of Toyota Motor Corporation. Since the security number is '7203', pass '7203.JP' as the first argument of DataReader and'stooq' as the second argument. I don't really understand'stooq', but I think it's an image of pulling stock prices from a site called'stooq'. (Please do not refer to it)

from pandas_datareader import data

df = data.DataReader('7203.JP', 'stooq')
df.head()

Execution result スクリーンショット 2020-11-14 10.03.02.png I will omit the details, but I was able to get the stock price.

Summary

This time, How to install and use pandas_datareader I wrote.

Keep in mind that you will be in trouble if you cannot get the stock price and graph it. In the future, we plan to improve graphing and data analysis.

reference

Get data with the Python library pandas_datareader-Python, books, kids, chat and pandas-datareader — pandas-datareader 0.9.0rc1+2.g427f658 documentation

Note

This article was written by a programming beginner and may be incorrect. Thank you for your understanding. Also, if you notice any mistakes, we would appreciate it if you could point them out. Thank you.

Recommended Posts

How to install and use pandas_datareader [Python]
How to install and use Tesseract-OCR
How to install and use Graphviz
How to install Python
How to install python
python: How to use locals () and globals ()
How to use Python zip and enumerate
How to use is and == in Python
[2020.8 latest] How to install Python
How to install Python [Windows]
[Python] How to use list 1
How to use Python argparse
Python: How to use pydub
[Python] How to use checkio
[Python] How to use hash function and tuple.
[Python] How to use input ()
How to install Cascade detector and how to use it
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Python bytes
[Python] [Django] How to use ChoiceField and how to add options
How to install python using anaconda
Python: How to use async with
[Python] How to use Pandas Series
How to use Requests (Python Library)
How to use SQLite in Python
How to install and configure blackbird
How to use .bash_profile and .bashrc
How to install CUDA and nvidia-driver
[Python] How to use list 3 Added
How to use Mysql in python
How to use OpenPose's Python API
How to use ChemSpider in Python
How to use FTP with Python
Python: How to use pydub (playback)
How to use PubChem in Python
How to use python zip function
[Python] How to use Typetalk API
[Introduction to Udemy Python 3 + Application] 36. How to use In and Not
[Python] Summary of how to use split and join functions
Install pyenv on MacBook Air and switch python to use
Comparison of how to use higher-order functions in Python 2 and 3
[Python] Summary of how to use pandas
How to package and distribute Python scripts
[Introduction to Python] How to use class in Python?
python3 How to install an external module
[Kivy] How to install Kivy on Windows [Python]
[python] How to use __command__, function explanation
[Python] How to use import sys sys.argv
[Python] Organizing how to use for statements
Memorandum on how to use gremlin python
[Python2.7] Summary of how to use unittest
How to use __slots__ in Python class
How to install and use pyenv, what to do if you can't switch python versions
Install python on xserver to use pip
How to use "deque" for Python data
[Python] How to calculate MAE and RMSE
[Python] Understand how to use recursive functions
Summary of how to use Python list