read_stata failing with URL · Issue #9231 · pandas-dev/pandas (original) (raw)

@jseabold

I'm not entirely sure the root cause yet. It's something to do with the default encoding I think. I'm pretty sure Stata uses iso-8859-1 not cp1252. Changing this inside pandas.io.maybe_read_encoded_stream works, but changing the encoding in StataReader breaks something else that I don't have time to debug.

Can someone sanity check me. Does this work on Python 2?

dta = pd.read_stata("http://www.stata-press.com/data/r13/fullauto.dta")