Skip to content

Add support for DataFrame(Categorical) #11363

New issue

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

Closed
michaelaye opened this issue Oct 18, 2015 · 1 comment · Fixed by #30305
Closed

Add support for DataFrame(Categorical) #11363

michaelaye opened this issue Oct 18, 2015 · 1 comment · Fixed by #30305
Labels
Categorical Categorical Data Type Constructors Series/DataFrame/Index/pd.array Constructors Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@michaelaye
Copy link
Contributor

This would be in symmetry with the existing support of DataFrame(np.array) and DataFrame(Series).

@jreback
Copy link
Contributor

jreback commented Oct 18, 2015

In [1]: DataFrame(Series(list('aabbc')).astype('category'))
Out[1]: 
   0
0  a
1  a
2  b
3  b
4  c

In [2]: DataFrame(Series(list('aabbc')).astype('category')).dtypes
Out[2]: 
0    category
dtype: object

DataFrame(Categorical(list('aabbc')) should be equivalent of [1]

@jreback jreback added Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode Categorical Categorical Data Type Difficulty Intermediate labels Oct 18, 2015
@jreback jreback added this to the Next Major Release milestone Oct 18, 2015
@jbrockmendel jbrockmendel added the Constructors Series/DataFrame/Index/pd.array Constructors label Jul 23, 2019
proost added a commit to proost/pandas that referenced this issue Dec 17, 2019
proost added a commit to proost/pandas that referenced this issue Dec 18, 2019
proost added a commit to proost/pandas that referenced this issue Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Constructors Series/DataFrame/Index/pd.array Constructors Enhancement Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants