statsmodels.iolib.foreign.genfromdta¶
-
statsmodels.iolib.foreign.
genfromdta
(fname, missing_flt=- 999.0, encoding=None, pandas=False, convert_dates=True)[source]¶ Returns an ndarray or DataFrame from a Stata .dta file.
Deprecated since version 0.11: Use pandas.read_stata or pandas.io.stata.StataReader
- Parameters
- fname
str
orfilehandle
Stata .dta file.
- missing_flt
numeric
The numeric value to replace missing values with. Will be used for any numeric value.
- encoding
str
,optional
Used for Python 3 only. Encoding to use when reading the .dta file. Defaults to locale.getpreferredencoding
- pandasbool
Optionally return a DataFrame instead of an ndarray
- convert_datesbool
If convert_dates is True, then Stata formatted dates will be converted to datetime types according to the variable’s format.
- fname