.2 2.2 -0.8 Hide specific rows in a MultiIndex but retain the index: >>> df.style.format("{:.1f}").hide(subset=(slice(None), ["a", "c"])) ... # doctest: +SKIP x y a b c a b c x b 0.7 1.0 1.3 1.5 -0.0 -0.2 y b -0.6 1.2 1.8 1.9 0.3 0.3 Hide specific rows and the index through chaining: >>> df.style.format("{:.1f}").hide(subset=(slice(None), ["a", "c"])).hide() ... # doctest: +SKIP x y a b c a b c 0.7 1.0 1.3 1.5 -0.0 -0.2 -0.6 1.2 1.8 1.9 0.3 0.3 Hide a specific level: >>> df.style.format("{:,.1f}").hide(level=1) # doctest: +SKIP x y a b c a b c x 0.1 0.0 0.4 1.3 0.6 -1.4 0.7 1.0 1.3 1.5 -0.0 -0.2 1.4 -0.8 1.6 -0.2 -0.4 -0.3 y 0.4 1.0 -0.2 -0.8 -1.2 1.1 -0.6 1.2 1.8 1.9 0.3 0.3 0.8 0.5 -0.3 1.2 2.2 -0.8 Hiding just the index level names: >>> df.index.names = ["lev0", "lev1"] >>> df.style.format("{:,.1f}").hide(names=True) # doctest: +SKIP x y a b c a b c x a 0.1 0.0 0.4 1.3 0.6 -1.4 b 0.7 1.0 1.3 1.5 -0.0 -0.2 c 1.4 -0.8 1.6 -0.2 -0.4 -0.3 y a 0.4 1.0 -0.2 -0.8 -1.2 1.1 b -0.6 1.2 1.8 1.9 0.3 0.3 c 0.8 0.5 -0.3 1.2 2.2 -0.8 Examples all produce equivalently transposed effects with ``axis="columns"``. r