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

DOC: styler.format does not, in fact, raise a KeyError #43097

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

attack68
Copy link
Contributor

This was actually never true from the start #40134. It might have been true at one point during the PR and then was overwritten without docs being corrected before final merge.

I.e. these docs have always been wrong since introduction.

Should be back portable.

df = DataFrame([[1.0, 2.0]], columns=["A", "B"])
df.style.format({"A": "{:.1f}", "B": "{:.2f}"}, subset = ["A"])  
# does not raise a KeyError for "B", just ignores.

@simonjayhawkins simonjayhawkins added Docs Styler conditional formatting using DataFrame.style labels Aug 18, 2021
@simonjayhawkins simonjayhawkins added this to the 1.3.3 milestone Aug 18, 2021
@jreback jreback merged commit 98c0c63 into pandas-dev:master Aug 18, 2021
@jreback
Copy link
Contributor

jreback commented Aug 18, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Aug 18, 2021

Something went wrong ... Please have a look at my logs.

jreback pushed a commit that referenced this pull request Aug 18, 2021
@attack68 attack68 deleted the doc_styler_format_subset_dict branch August 19, 2021 05:23
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Co-authored-by: JHM Darbyshire (iMac) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants