Skip to content

Commit 154026c

Browse files
authored
DEPR: Styler.set_na_rep and .set_precision in favour of .format(na_rep='x', precision=3) (#40134)
1 parent 2a6fff3 commit 154026c

File tree

4 files changed

+195
-114
lines changed

4 files changed

+195
-114
lines changed

doc/source/reference/style.rst

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Style application
3535
Styler.applymap
3636
Styler.where
3737
Styler.format
38-
Styler.set_precision
3938
Styler.set_td_classes
4039
Styler.set_table_styles
4140
Styler.set_table_attributes
@@ -44,7 +43,6 @@ Style application
4443
Styler.set_caption
4544
Styler.set_properties
4645
Styler.set_uuid
47-
Styler.set_na_rep
4846
Styler.clear
4947
Styler.pipe
5048

doc/source/whatsnew/v1.3.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ Deprecations
364364
- Deprecated :meth:`core.window.ewm.ExponentialMovingWindow.vol` (:issue:`39220`)
365365
- Using ``.astype`` to convert between ``datetime64[ns]`` dtype and :class:`DatetimeTZDtype` is deprecated and will raise in a future version, use ``obj.tz_localize`` or ``obj.dt.tz_localize`` instead (:issue:`38622`)
366366
- Deprecated casting ``datetime.date`` objects to ``datetime64`` when used as ``fill_value`` in :meth:`DataFrame.unstack`, :meth:`DataFrame.shift`, :meth:`Series.shift`, and :meth:`DataFrame.reindex`, pass ``pd.Timestamp(dateobj)`` instead (:issue:`39767`)
367+
- Deprecated :meth:`.Styler.set_na_rep` and :meth:`.Styler.set_precision` in favour of :meth:`.Styler.format` with ``na_rep`` and ``precision`` as existing and new input arguments respectively (:issue:`40134`)
367368
- Deprecated allowing partial failure in :meth:`Series.transform` and :meth:`DataFrame.transform` when ``func`` is list-like or dict-like; will raise if any function fails on a column in a future version (:issue:`40211`)
368369

369370
.. ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)