Skip to content

API: Remove deprecated Factor (GH3650) #5000

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 1 commit into from
Sep 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ API Changes
Indexing on other index types are preserved (and positional fallback for ``[],ix``), with the exception, that floating point slicing
on indexes on non ``Float64Index`` will raise a ``TypeError``, e.g. ``Series(range(5))[3.5:4.5]`` (:issue:`263`)
- Make Categorical repr nicer (:issue:`4368`)
- Remove deprecated ``Factor`` (:issue:`3650`)

Internal Refactoring
~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pandas.core.algorithms import factorize, match, unique, value_counts
from pandas.core.common import isnull, notnull
from pandas.core.categorical import Categorical, Factor
from pandas.core.categorical import Categorical
from pandas.core.format import (set_printoptions, reset_printoptions,
set_eng_float_format)
from pandas.core.index import Index, Int64Index, Float64Index, MultiIndex
Expand Down
13 changes: 0 additions & 13 deletions pandas/core/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,3 @@ def describe(self):
counts=counts,
freqs=freqs,
levels=self.levels)).set_index('levels')


class Factor(Categorical):
def __init__(self, labels, levels=None, name=None):
from warnings import warn
warn("Factor is deprecated. Use Categorical instead", FutureWarning)
super(Factor, self).__init__(labels, levels, name)

@classmethod
def from_array(cls, data):
from warnings import warn
warn("Factor is deprecated. Use Categorical instead", FutureWarning)
return super(Factor, cls).from_array(data)