Skip to content

PERF: rendering of large number of categories #11305

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
jreback opened this issue Oct 12, 2015 · 1 comment
Closed

PERF: rendering of large number of categories #11305

jreback opened this issue Oct 12, 2015 · 1 comment
Labels
Categorical Categorical Data Type Output-Formatting __repr__ of pandas objects, to_string
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Oct 12, 2015

xref #11304

items = [str(i) for i in range(40000)]
s = pd.Series(items, dtype='category')
df = pd.DataFrame({'C':s, 'data':np.random.randn(40000)})
data = df[df.C=='20']
str(data.C)

This renders the string of all of the categories before chopping them, see here

This should check for a large number of categories first, then render the chopped portions.

@jreback jreback added Output-Formatting __repr__ of pandas objects, to_string Difficulty Novice Categorical Categorical Data Type labels Oct 12, 2015
@jreback jreback added this to the 0.17.1 milestone Oct 12, 2015
@jreback
Copy link
Contributor Author

jreback commented Oct 12, 2015

cc @michaelaye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant