Reputation: 96360
Say I want to save the state of the display options for pandas, change them, and restore them later. Is there any way to do this without recording (and later restoring) each of the options one by one?
Upvotes: 1
Views: 92
Reputation: 129018
docs are here, see bottom of that section, this feature is new in 0.13.1
You can pass 1 or more options here
with pd.option_context('display.max_columns',1): # do something cool
Upvotes: 4