8000 REF/BUG/API: factorizing categorical data by TomAugspurger · Pull Request #19938 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

REF/BUG/API: factorizing categorical data #19938

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

Merged
merged 14 commits into from
Mar 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement interface
  • Loading branch information
TomAugspurger committed Mar 13, 2018
commit ab4f01c0eec37baf9c2bb47014ee192484bd7200
4 changes: 4 additions & 0 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ def _ndarray_values(self):
def _constructor(self):
return Categorical

@classmethod
def _constructor_from_sequence(cls, scalars):
return Categorical(scalars)

def copy(self):
""" Copy constructor. """
return self._constructor(values=self._codes.copy(),
Expand Down
0