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

ENH: DataFrame.style option for hiding the index #14194

Closed
TomAugspurger opened this Issue Sep 9, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@TomAugspurger
Contributor

TomAugspurger commented Sep 9, 2016

Code Sample, a copy-pastable example if possible

df = pd.DataFrame(np.random.randn(10, 2))
df.style.set_include_index(False)  # name TBD

Expected Output

Same output, but without the index

Would maybe want a way to hide the columns too.


Current workaround

df = pd.DataFrame(np.random.randn(10, 2))
df.style.set_table_styles([
    {'selector': '.row_heading, .blank', 'props': [('display', 'none;')]}
])

This doesn't work if there's a df.index.name and almost surely doesn't work with MultiIndexes.

@TomAugspurger TomAugspurger added this to the 0.20.0 milestone Sep 9, 2016

@jreback jreback modified the milestones: 0.20.0, Next Major Release Mar 23, 2017

@jreback jreback modified the milestones: Next Major Release, 0.21.0 Sep 25, 2017

@jreback jreback modified the milestones: 0.21.0, Next Major Release Oct 2, 2017

@jreback jreback modified the milestones: Next Major Release, 0.22.0 Nov 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment