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
+30-4
Original file line number
Diff line number
Diff line change
@@ -793,7 +793,8 @@
793
793
"source": [
794
794
"The next option you have are \"table styles\".\n",
795
795
"These are styles that apply to the table as a whole, but don't look at the data.\n",
796
-
"Certain stylings, including pseudo-selectors like `:hover` can only be used this way."
796
+
"Certain stylings, including pseudo-selectors like `:hover` can only be used this way.\n",
797
+
"These can also be used to set specific row or column based class selectors, as will be shown."
797
798
]
798
799
},
799
800
{
@@ -831,9 +832,32 @@
831
832
"The value for `props` should be a list of tuples of `('attribute', 'value')`.\n",
832
833
"\n",
833
834
"`table_styles` are extremely flexible, but not as fun to type out by hand.\n",
834
-
"We hope to collect some useful ones either in pandas, or preferable in a new package that [builds on top](#Extensibility) the tools here."
835
+
"We hope to collect some useful ones either in pandas, or preferable in a new package that [builds on top](#Extensibility) the tools here.\n",
836
+
"\n",
837
+
"`table_styles` can be used to add column and row based class descriptors. For large tables this can increase performance by avoiding repetitive individual css for each cell, and it can also simplify style construction in some cases.\n",
838
+
"If `table_styles` is given as a dictionary each key should be a specified column or index value and this will map to specific class CSS selectors of the given column or row.\n",
839
+
"\n",
840
+
"Note that `Styler.set_table_styles` will overwrite existing styles but can be chained by setting the `overwrite` argument to `False`."
"- DataFrame only `(use Series.to_frame().style)`\n",
923
947
"- The index and columns must be unique\n",
924
948
"- No large repr, and performance isn't great; this is intended for summary DataFrames\n",
925
-
"- You can only style the *values*, not the index or columns\n",
949
+
"- You can only style the *values*, not the index or columns (except with `table_styles` above)\n",
926
950
"- You can only apply styles, you can't insert new HTML entities\n",
927
951
"\n",
928
-
"Some of these will be addressed in the future.\n"
952
+
"Some of these will be addressed in the future.\n",
953
+
"Performance can suffer when adding styles to each cell in a large DataFrame.\n",
954
+
"It is recommended to apply table or column based styles where possible to limit overall HTML length, as well as setting a shorter UUID to avoid unnecessary repeated data transmission. \n"
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v1.1.5.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Fixed regressions
17
17
- Regression in addition of a timedelta-like scalar to a :class:`DatetimeIndex` raising incorrectly (:issue:`37295`)
18
18
- Fixed regression in :meth:`Series.groupby` raising when the :class:`Index` of the :class:`Series` had a tuple as its name (:issue:`37755`)
19
19
- Fixed regression in :meth:`DataFrame.loc` and :meth:`Series.loc` for ``__setitem__`` when one-dimensional tuple was given to select from :class:`MultiIndex` (:issue:`37711`)
20
-
-
20
+
- Fixed regression in inplace operations on :class:`Series` with ``ExtensionDtype`` with NumPy dtyped operand (:issue:`37910`)
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v1.2.0.rst
+2
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,7 @@ Other enhancements
232
232
- :class:`Index` with object dtype supports division and multiplication (:issue:`34160`)
233
233
- :meth:`DataFrame.explode` and :meth:`Series.explode` now support exploding of sets (:issue:`35614`)
234
234
- :meth:`DataFrame.hist` now supports time series (datetime) data (:issue:`32590`)
235
+
- :meth:`Styler.set_table_styles` now allows the direct styling of rows and columns and can be chained (:issue:`35607`)
235
236
- ``Styler`` now allows direct CSS class name addition to individual data cells (:issue:`36159`)
236
237
- :meth:`Rolling.mean()` and :meth:`Rolling.sum()` use Kahan summation to calculate the mean to avoid numerical problems (:issue:`10319`, :issue:`11645`, :issue:`13254`, :issue:`32761`, :issue:`36031`)
237
238
- :meth:`DatetimeIndex.searchsorted`, :meth:`TimedeltaIndex.searchsorted`, :meth:`PeriodIndex.searchsorted`, and :meth:`Series.searchsorted` with datetimelike dtypes will now try to cast string arguments (listlike and scalar) to the matching datetimelike type (:issue:`36346`)
@@ -619,6 +620,7 @@ Indexing
619
620
- Bug in indexing on a :class:`Series` or :class:`DataFrame` with a :class:`CategoricalIndex` using listlike indexer that contains elements that are in the index's ``categories`` but not in the index itself failing to raise ``KeyError`` (:issue:`37901`)
620
621
- Bug in :meth:`DataFrame.iloc` and :meth:`Series.iloc` aligning objects in ``__setitem__`` (:issue:`22046`)
621
622
- Bug in :meth:`DataFrame.loc` did not raise ``KeyError`` when missing combination was given with ``slice(None)`` for remaining levels (:issue:`19556`)
623
+
- Bug in :meth:`DataFrame.loc` raising ``TypeError`` when non-integer slice was given to select values from :class:`MultiIndex` (:issue:`25165`, :issue:`24263`)
622
624
- Bug on inserting a boolean label into a :class:`DataFrame` with a numeric :class:`Index` columns incorrectly casting to integer (:issue:`36319`)
0 commit comments