Skip to content

Commit 1aea1b6

Browse files
attack68noatamir
authored andcommitted
DEPR: remove 1.0 deprecations in 2.0 (Styler) (pandas-dev#49397)
* styler deprecations cleaned up * styler deprecations cleaned up * styler deprecations cleaned up * whats new added Co-authored-by: JHM Darbyshire (iMac) <[email protected]>
1 parent 4d09fb3 commit 1aea1b6

File tree

5 files changed

+10
-505
lines changed

5 files changed

+10
-505
lines changed

asv_bench/benchmarks/io/style.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ def _style_format(self):
8383
def _style_apply_format_hide(self):
8484
self.st = self.df.style.applymap(lambda v: "color: red;")
8585
self.st.format("{:.3f}")
86-
self.st.hide_index(self.st.index[1:])
87-
self.st.hide_columns(self.st.columns[1:])
86+
self.st.hide(self.st.index[1:], axis=0)
87+
self.st.hide(self.st.columns[1:], axis=1)
8888

8989
def _style_tooltips(self):
9090
ttips = DataFrame("abc", index=self.df.index[::2], columns=self.df.columns[::2])
9191
self.st = self.df.style.set_tooltips(ttips)
92-
self.st.hide_index(self.st.index[12:])
93-
self.st.hide_columns(self.st.columns[12:])
92+
self.st.hide(self.st.index[12:], axis=0)
93+
self.st.hide(self.st.columns[12:], axis=1)

doc/source/whatsnew/v2.0.0.rst

+5
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ Removal of prior version deprecations/changes
175175
- Removed deprecated ``weekofyear`` and ``week`` attributes of :class:`DatetimeArray`, :class:`DatetimeIndex` and ``dt`` accessor in favor of ``isocalendar().week`` (:issue:`33595`)
176176
- Removed deprecated :meth:`RangeIndex._start`, :meth:`RangeIndex._stop`, :meth:`RangeIndex._step`, use ``start``, ``stop``, ``step`` instead (:issue:`30482`)
177177
- Removed deprecated :meth:`DatetimeIndex.to_perioddelta`, Use ``dtindex - dtindex.to_period(freq).to_timestamp()`` instead (:issue:`34853`)
178+
- Removed deprecated :meth:`.Styler.hide_index` and :meth:`.Styler.hide_columns` (:issue:`49397`)
179+
- Removed deprecated :meth:`.Styler.set_na_rep` and :meth:`.Styler.set_precision` (:issue:`49397`)
180+
- Removed deprecated :meth:`.Styler.where` (:issue:`49397`)
181+
- Removed deprecated :meth:`.Styler.render` (:issue:`49397`)
182+
- Removed deprecated argument ``null_color`` in :meth:`.Styler.highlight_null` (:issue:`49397`)
178183
- Enforced deprecation disallowing passing a timezone-aware :class:`Timestamp` and ``dtype="datetime64[ns]"`` to :class:`Series` or :class:`DataFrame` constructors (:issue:`41555`)
179184
- Enforced deprecation disallowing passing a sequence of timezone-aware values and ``dtype="datetime64[ns]"`` to to :class:`Series` or :class:`DataFrame` constructors (:issue:`41555`)
180185
- Enforced deprecation disallowing using ``.astype`` to convert a ``datetime64[ns]`` :class:`Series`, :class:`DataFrame`, or :class:`DatetimeIndex` to timezone-aware dtype, use ``obj.tz_localize`` or ``ser.dt.tz_localize`` instead (:issue:`39258`)

0 commit comments

Comments
 (0)