CoCalc Public Filespandas-datareader.ipynbOpen with one click!
Author: Harald Schilly
Views : 88
Compute Environment: Ubuntu 18.04 (Deprecated)
In [ ]:
import pandas_datareader pandas_datareader.__version__
'0.8.1'
In [15]:
import pandas_datareader.data as web from datetime import datetime
In [5]:
df = web.DataReader('TUD', 'oecd') df.loc[:, "Austria"].tail()
Source Administrative data Survey data
Series Employees Union members Trade union density Employees Union members Trade union density
Year
2016-01-01 2767.0 1420.0 51.3 NaN NaN NaN
2017-01-01 2778.0 1414.0 50.9 NaN NaN NaN
2018-01-01 2812.0 1380.0 49.1 NaN NaN NaN
In [12]:
from pandas_datareader.nasdaq_trader import get_nasdaq_symbols symbols = get_nasdaq_symbols() print(symbols.loc['BA'])
Nasdaq Traded True Security Name Boeing Company (The) Common Stock Listing Exchange N Market Category ETF False Round Lot Size 100 Test Issue False Financial Status NaN CQS Symbol BA NASDAQ Symbol BA NextShares False Name: BA, dtype: object
In [ ]:
f = web.DataReader('BA', 'stooq')
In [27]:
f[:'2019-05-01']
Open High Low Close Volume
Date
2020-05-18 126.18 136.2000 125.7998 135.44 43891480
2020-05-15 118.33 121.8899 117.7800 120.00 26756829
2020-05-14 118.98 122.6100 113.8900 122.52 37499202
2020-05-13 125.00 125.0700 119.3300 121.50 26001998
2020-05-12 129.72 133.1200 125.1989 125.22 22578972
... ... ... ... ... ...
2019-05-07 357.73 359.0800 346.7000 348.84 9974339
2019-05-06 359.25 363.7500 357.0600 362.87 4861675
2019-05-03 367.26 369.0300 365.4500 367.62 3024813
2019-05-02 366.69 368.8000 364.4900 366.99 2497357
2019-05-01 369.64 372.2500 367.5400 367.95 2832022

265 rows × 5 columns

In [28]:
f[:'2019-05-01'].Close.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x7f107d2da1d0>
In [ ]: