Logo

statsmodels.datasets.webuse

statsmodels.datasets.webuse(data, baseurl='http://www.stata-press.com/data/r11/', as_df=True)

Download and return an example dataset from Stata.

Parameters:

data : str

Name of dataset to fetch.

baseurl : str

The base URL to the stata datasets.

as_df : bool

If True, returns a pandas.DataFrame

Returns:

dta : Record Array

A record array containing the Stata dataset.

Notes

Make sure baseurl has trailing forward slash. Doesn’t do any error checking in response URLs.

Examples

>>> dta = webuse('auto')

Previous topic

Yearly sunspots data 1700-2008

Next topic

statsmodels.datasets.get_rdataset

This Page