ENH: Styler.apply
with axis=None
can accept ndarray
#39359
Labels
Milestone
Styler.apply
with axis=None
can accept ndarray
#39359
Currently
Styler.apply
withaxis=0
andaxis=1
permit functions which return array-like objects, provided they are of appropriate shape. Withaxis=None
the return must be aDataFrame
.This means the following example:
Describe the solution you'd like
The solution is a relatively simple change to code as part of the
Styler._apply
method that checks forarray-like
(or specificallyndarray
) result instead ofDataFrame
, and constructs aDataFrame
from that data if needs be, with appropriate index and cols.API breaking implications
None since all previous behaviour is replicable.
The text was updated successfully, but these errors were encountered: