Skip to content
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

Series do not display HTML repr #5563

Open
ghost opened this issue Nov 20, 2013 · 10 comments
Open

Series do not display HTML repr #5563

ghost opened this issue Nov 20, 2013 · 10 comments
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string Series Series data structure

Comments

@ghost
Copy link

ghost commented Nov 20, 2013

Not sure if it's always been this way or if refactoring broke something.
In any case it looks strange when in ipnb:
series repr

related to #5550, making reprs consistent.

@jtratner
Copy link
Contributor

It's always been that way.

@ghost
Copy link
Author

ghost commented Nov 20, 2013

Thought so, it's surprising users haven't flagged this earlier then.

@lexual
Copy link
Contributor

lexual commented Jun 6, 2015

#10300

@jreback jreback modified the milestones: 0.17.1, Next Major Release Oct 11, 2015
@jreback jreback modified the milestones: Next Major Release, 0.17.1 Nov 18, 2015
@jorisvandenbossche jorisvandenbossche added Needs Discussion Requires discussion from core team before further action and removed Difficulty Novice labels Jun 18, 2016
@smcinerney
Copy link

smcinerney commented Nov 18, 2016

WORKAROUND: Series.to_frame() e.g. df.isnull().sum().to_frame()

@ankostis
Copy link

ankostis commented Nov 18, 2016

Series should have a different output from Frames. See #10300 (comment)

@smcinerney
Copy link

I guess we can't distinguish between a plain dataframe Series e.g. produced by a slice, and a "table-like" series produced by a function like df.isnull().sum(), where the row-indices are actually column names of the df? The latter is really a table in disguise. pandas does this a lot.

@TomAugspurger
Copy link
Contributor

FWIW, I think DataFrames having the column names above, and Series having the name below (perhaps as a caption) should be visually distinct enough.

@datapythonista datapythonista modified the milestones: Contributions Welcome, Someday Jul 8, 2018
@big-o
Copy link

big-o commented Oct 27, 2019

I've taken an initial stab at this. It's my first contribution to the project so it's probably pretty messy and will need some further work, but if it's the sort of thing you're after and can point me in the right direction of what extra bits are needed then I'm happy to do it.

Here's my fork: https://github.com/big-o/pandas. I haven't submitted a PR yet because it needs unit tests and I don't want to start on that until I'm certain that I'm on the right track functionality-wise.

It doesn't quite support everything that DataFrame.to_html() does (justify and sparsify options aren't implemented) but it hopefully covers the most important bits.

Here's a few screenshots:
series1
series2
series3

@jreback
Copy link
Contributor

jreback commented Oct 27, 2019

would be easier to review as a PR (then we can comment directly on the impl); you can add tests later

@big-o
Copy link

big-o commented Oct 27, 2019

would be easier to review as a PR (then we can comment directly on the impl); you can add tests later

Done!

@big-o big-o mentioned this issue Nov 3, 2019
5 tasks
@mroeschke mroeschke removed this from the Someday milestone Oct 13, 2022
@mroeschke mroeschke added Series Series data structure and removed Needs Discussion Requires discussion from core team before further action labels Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO HTML read_html, to_html, Styler.apply, Styler.applymap Output-Formatting __repr__ of pandas objects, to_string Series Series data structure
Projects
None yet