You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/user_guide/style.ipynb
+2-2
Original file line number
Diff line number
Diff line change
@@ -352,7 +352,7 @@
352
352
"\n",
353
353
"- Using [.set_table_styles()][table] to control broader areas of the table with specified internal CSS. Although table styles allow the flexibility to add CSS selectors and properties controlling all individual parts of the table, they are unwieldy for individual cell specifications. Also, note that table styles cannot be exported to Excel. \n",
354
354
"- Using [.set_td_classes()][td_class] to directly link either external CSS classes to your data cells or link the internal CSS classes created by [.set_table_styles()][table]. See [here](#Setting-Classes-and-Linking-to-External-CSS). These cannot be used on column header rows or indexes, and also won't export to Excel. \n",
355
-
"- Using the [.apply()][apply] and [.applymap()][applymap] functions to add direct internal CSS to specific data cells. See [here](#Styler-Functions). As of v1.4.0 there are also methods that work directly on column header rows or indexes; [.apply_index()][applyindex] and [.applymap_index()][applymapindex]. Note that only these methods add styles that will export to Excel. These methods work in a similar way to [DataFrame.apply()][dfapply] and [DataFrame.applymap()][dfapplymap].\n",
355
+
"- Using the [.apply()][apply] and [.applymap()][applymap] functions to add direct internal CSS to specific data cells. See [here](#Styler-Functions). As of v1.4.0 there are also methods that work directly on column header rows or indexes; [.apply_index()][applyindex] and [.applymap_index()][applymapindex]. Note that only these methods add styles that will export to Excel. These methods work in a similar way to [DataFrame.apply()][dfapply] and [DataFrame.map()][dfmap].\n",
When given a callable, :meth:`Series.map` applies the callable to all elements of the :class:`Series`.
28
-
Similarly, :meth:`DataFrame.applymap` applies the callable to all elements of the :class:`DataFrame`,
28
+
Similarly, :meth:`DataFrame.map` applies the callable to all elements of the :class:`DataFrame`,
29
29
while :meth:`Index.map` applies the callable to all elements of the :class:`Index`.
30
30
31
31
Frequently, it is not desirable to apply the callable to nan-like values of the array and to avoid doing
@@ -59,10 +59,12 @@ and ``na_action="ignore"`` did not work correctly for any ``ExtensionArray`` sub
59
59
ser = pd.Series(["a", "b", np.nan], dtype="category")
60
60
ser.map(str.upper, na_action="ignore")
61
61
df = pd.DataFrame(ser)
62
-
df.applymap(str.upper, na_action="ignore")
62
+
df.map(str.upper, na_action="ignore")
63
63
idx = pd.Index(ser)
64
64
idx.map(str.upper, na_action="ignore")
65
65
66
+
Notice also that in this version, :meth:`DataFrame.map` been added and :meth:`DataFrame.applymap` has been deprecated. :meth:`DataFrame.map` has the same functionality as :meth:`DataFrame.applymap`, but the new name better communicate that this is the :class:`DataFrame` version of :meth:`Series.map` (:issue:`52353`).
67
+
66
68
Also, note that :meth:`Categorical.map` implicitly has had its ``na_action`` set to ``"ignore"`` by default.
67
69
This has been deprecated and will :meth:`Categorical.map` in the future change the default
68
70
to ``na_action=None``, like for all the other array types.
- Deprecated :meth:`DataFrame.applymap`. Use the new :meth:`DataFrame.map` method instead (:issue:`52353`)
227
230
- Deprecated :meth:`DataFrame.swapaxes` and :meth:`Series.swapaxes`, use :meth:`DataFrame.transpose` or :meth:`Series.transpose` instead (:issue:`51946`)
- Deprecated behavior of :meth:`Series.dt.to_pydatetime`, in a future version this will return a :class:`Series` containing python ``datetime`` objects instead of an ``ndarray`` of datetimes; this matches the behavior of other :meth:`Series.dt` properties (:issue:`20306`)
0 commit comments