import sys
sys.version
pip install pandas-datareader
import pandas_datareader as pdr
pdr.get_data_fred('GS10')
GS10 | |
---|---|
DATE | |
2017-05-01 | 2.30 |
2017-06-01 | 2.19 |
2017-07-01 | 2.32 |
2017-08-01 | 2.21 |
2017-09-01 | 2.20 |
2017-10-01 | 2.36 |
2017-11-01 | 2.35 |
2017-12-01 | 2.40 |
2018-01-01 | 2.58 |
2018-02-01 | 2.86 |
2018-03-01 | 2.84 |
2018-04-01 | 2.87 |
2018-05-01 | 2.98 |
2018-06-01 | 2.91 |
2018-07-01 | 2.89 |
2018-08-01 | 2.89 |
2018-09-01 | 3.00 |
2018-10-01 | 3.15 |
2018-11-01 | 3.12 |
2018-12-01 | 2.83 |
2019-01-01 | 2.71 |
2019-02-01 | 2.68 |
2019-03-01 | 2.57 |
2019-04-01 | 2.53 |
2019-05-01 | 2.40 |
2019-06-01 | 2.07 |
2019-07-01 | 2.06 |
2019-08-01 | 1.63 |
2019-09-01 | 1.70 |
2019-10-01 | 1.71 |
2019-11-01 | 1.81 |
2019-12-01 | 1.86 |
2020-01-01 | 1.76 |
2020-02-01 | 1.50 |
2020-03-01 | 0.87 |
2020-04-01 | 0.66 |
2020-05-01 | 0.67 |
2020-06-01 | 0.73 |
2020-07-01 | 0.62 |
2020-08-01 | 0.65 |
2020-09-01 | 0.68 |
2020-10-01 | 0.79 |
2020-11-01 | 0.87 |
2020-12-01 | 0.93 |
2021-01-01 | 1.08 |
2021-02-01 | 1.26 |
2021-03-01 | 1.61 |
2021-04-01 | 1.64 |
2021-05-01 | 1.62 |
2021-06-01 | 1.52 |
2021-07-01 | 1.32 |
2021-08-01 | 1.28 |
2021-09-01 | 1.37 |
2021-10-01 | 1.58 |
2021-11-01 | 1.56 |
2021-12-01 | 1.47 |
2022-01-01 | 1.76 |
2022-02-01 | 1.93 |
2022-03-01 | 2.13 |
import pandas_datareader.data as web
#stock_data = web.DataReader('銘柄','API', 開始日, 終了日)
nikkei225 = web.DataReader('^N225', 'yahoo', "2021-04-01", "2021-04-30")
nikkei225
High | Low | Open | Close | Volume | Adj Close | |
---|---|---|---|---|---|---|
Date | ||||||
2021-04-01 | 29585.460938 | 29318.820312 | 29441.910156 | 29388.869141 | 75600000 | 29388.869141 |
2021-04-02 | 29869.669922 | 29694.089844 | 29704.660156 | 29854.000000 | 57200000 | 29854.000000 |
2021-04-05 | 30195.000000 | 30024.250000 | 30084.609375 | 30089.250000 | 55400000 | 30089.250000 |
2021-04-06 | 30208.890625 | 29665.859375 | 30208.890625 | 29696.630859 | 65500000 | 29696.630859 |
2021-04-07 | 29867.939453 | 29523.550781 | 29743.480469 | 29730.789062 | 61500000 | 29730.789062 |
2021-04-08 | 29744.789062 | 29516.419922 | 29675.880859 | 29708.980469 | 62600000 | 29708.980469 |
2021-04-09 | 30064.349609 | 29768.060547 | 29865.529297 | 29768.060547 | 64900000 | 29768.060547 |
2021-04-12 | 29876.039062 | 29538.730469 | 29874.429688 | 29538.730469 | 50200000 | 29538.730469 |
2021-04-13 | 29897.109375 | 29573.789062 | 29605.689453 | 29751.609375 | 54900000 | 29751.609375 |
2021-04-14 | 29722.400391 | 29567.179688 | 29718.060547 | 29620.990234 | 57200000 | 29620.990234 |
2021-04-15 | 29787.660156 | 29558.550781 | 29573.900391 | 29642.689453 | 50600000 | 29642.689453 |
2021-04-16 | 29789.080078 | 29621.830078 | 29789.080078 | 29683.369141 | 49100000 | 29683.369141 |
2021-04-19 | 29808.009766 | 29530.839844 | 29688.320312 | 29685.369141 | 44700000 | 29685.369141 |
2021-04-20 | 29361.279297 | 29014.359375 | 29355.869141 | 29100.380859 | 59900000 | 29100.380859 |
2021-04-21 | 28778.929688 | 28419.839844 | 28660.359375 | 28508.550781 | 71000000 | 28508.550781 |
2021-04-22 | 29192.390625 | 28800.859375 | 28880.779297 | 29188.169922 | 55100000 | 29188.169922 |
2021-04-23 | 29035.339844 | 28770.619141 | 28939.119141 | 29020.630859 | 47500000 | 29020.630859 |
2021-04-26 | 29241.279297 | 28896.369141 | 29095.490234 | 29126.230469 | 49200000 | 29126.230469 |
2021-04-27 | 29187.109375 | 28990.189453 | 29174.529297 | 28991.890625 | 59400000 | 28991.890625 |
2021-04-28 | 29139.699219 | 28875.910156 | 28935.509766 | 29053.970703 | 61400000 | 29053.970703 |
2021-04-30 | 29046.490234 | 28760.269531 | 28996.660156 | 28812.630859 | 78400000 | 28812.630859 |