We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look at dfx
dfx
In [1]: import pandas as pd In [2]: df = pd.DataFrame({"id":[1,2,3,4,5,6], "raw_grade":['a', 'b', 'b', 'a', 'a', 'e']}) ...: df["grade"] = pd.Categorical(df["raw_grade"]) ...: df['grade'].cat.reorder_levels(['e', 'a', 'b']) ...: In [3]: df1 = df[0:3] ...: df2 = df[3:] ...: In [4]: df['grade'].cat.levels Out[4]: Index([u'e', u'a', u'b'], dtype='object') In [5]: df1['grade'].cat.levels Out[5]: Index([u'e', u'a', u'b'], dtype='object') In [6]: df2['grade'].cat.levels Out[6]: Index([u'e', u'a', u'b'], dtype='object') In [7]: dfx = pd.concat([df1, df2]) In [8]: dfx['grade'].cat.levels Out[8]: Index([u'a', u'b', u'e'], dtype='object')
version: pandas: 0.14.1-78-g24b309f
pandas: 0.14.1-78-g24b309f
This is still the case after either of PR #7768 and PR #7850.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Look at
dfx
version:
pandas: 0.14.1-78-g24b309f
This is still the case after either of PR #7768 and PR #7850.
The text was updated successfully, but these errors were encountered: