df.to_json segfaults with categorical column types · Issue #10778 · pandas-dev/pandas (original) (raw)

This code from the Categorical tutorial:

df = pd.DataFrame({"A":["a","b","c","a"]}) df["B"] = df["A"].astype('category')

Will segfault when df.to_json is called. Tested on:

Python 3.4.3 |Anaconda 2.3.0 (x86_64)| (default, Mar 6 2015, 12:07:41) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin $ conda list | grep pandas pandas 0.16.2 np19py34_0