A Python package which contains 111 data sets from one of the most famous econometrics textbooks for undergraduates.
It is used in Using Python for Introductory Econometrics, which is a sister book Using R for Introductory Econometrics.
It is also extensively used in Pythonで学ぶ入門計量経済学 (Japanese).
First things first.
import wooldridge
To load a data set named <dataset>
:
wooldridge.data('<dataset>')
It returns pandas DataFrame
. Note that <dataset>
is entered in strings. For example, to load a data set mroz
into df
:
df = wooldridge.data('mroz')
To show the description (e.g. variable definitions and sources) of a data set:
wooldridge.data('mroz', description=True)
To show the list of 111 data sets contained in the package
wooldridge.data()
pip install wooldridge
or
git clone https://github.com/spring-haru/wooldridge.git
pip install .
The function dataWoo()
introduced in the previous versions also works:
from wooldridge import *
df = dataWoo('<dataset>')
dataWoo('<dataset>', description=True)
dataWoo()
J.M. Wooldridge (2016) Introductory Econometrics: A Modern Approach, Cengage Learning, 6th edition.