Skip to content

Categorical cleanup #3603

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 12 commits into from
May 19, 2013
Merged

Categorical cleanup #3603

merged 12 commits into from
May 19, 2013

Conversation

jseabold
Copy link
Contributor

Make categorical a little more user-friendly and add some documentation.

@jseabold
Copy link
Contributor Author

Added a describe method as well.

@ghost
Copy link

ghost commented May 14, 2013

looks good to me, marked for 0.11.1

@jreback
Copy link
Contributor

jreback commented May 14, 2013

To be consistent (and not have the deprecate warnings internally), a couple of minor changes

./doc/source/groupby.rst:
  609 : Categorical variables represented as instance of pandas's ``Factor`` class can
./pandas/core/frame.py:
 5427 :     ndarray corresponding to Factor levels
./pandas/core/panel.py:
   85 :     time_factor = Factor.from_array(time)
   86 :     panel_factor = Factor.from_array(panels)
./pandas/core/reshape.py:
  813 :     """ given a tuple of shape and a list of Factor lables, return the expanded label indexer """
./pandas/tools/merge.py:
 1193 :             levels = [Factor.from_array(zp).levels for zp in zipped]
 1231 :             factor = Factor.from_array(concat_index)

@jseabold
Copy link
Contributor Author

Should I just change everything to Categorical? My reasoning for the deprecation is that Factor conflicts with the use of the term in patsy where a factor is not a "factor" in the R sense. I believe @wesm and @njsmith decided that Categorical was unambiguous and preferred, and I tend to agree but don't have a really strong feeling about this.

@jreback
Copy link
Contributor

jreback commented May 14, 2013

I say yes (its not much to change), leave in Factor for 0.11.1 with your deprecate, and can remove in 0.12?

@jseabold
Copy link
Contributor Author

Ok, should be better. No deprecation warnings internally now, though I left the term factor in a few places where it's clear from context what it's referring to (I think).

@jreback
Copy link
Contributor

jreback commented May 19, 2013

@jseabold can you add a release notes & v0.11.1 mention?

@jreback jreback mentioned this pull request May 19, 2013
@jreback jreback merged commit 76644bf into pandas-dev:master May 19, 2013
@jreback
Copy link
Contributor

jreback commented May 19, 2013

thank you sir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants