You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pandas now handles categorical and ordinal variables within the blocks of a DataFrame. Will need to write some code to handle these appropriately. Right now we do get a fairly informative error message though. As an example (Python 3, pandas 0.15.2)
[~/]
[55]: from io import BytesIO
[~/]
[56]: from urllib.request import urlopen
[~/]
[57]: dta = pd.read_stata(BytesIO(urlopen("http://www.stata-press.com/data/r13/fullauto.dta").read()))
Actually might need some special handling. It doesn't look like it's obvious which are ordered and which aren't. All are assumed to ordered according to their 'codes', formerly 'levels'.
Activity
jseabold commentedon Dec 15, 2014
Actually might need some special handling. It doesn't look like it's obvious which are ordered and which aren't. All are assumed to ordered according to their 'codes', formerly 'levels'.
jseabold commentedon Jan 9, 2015
See also pydata/patsy#47
kousu commentedon Feb 3, 2015
In particular, it would be nice if sm.tools.tools.categorical understood these without having to specify which column it is.