Skip to content

Commit 6ee454f

Browse files
committed
fix issues
1 parent 178153b commit 6ee454f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: pandas/core/apply.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def transform(self) -> DataFrame | Series:
217217

218218
if obj._get_axis_number(axis) == 1:
219219
assert not is_series
220-
soo = False if by_row else True
220+
soo = not by_row
221221
return obj.T.transform(func, 0, *args, series_ops_only=soo, **kwargs).T
222222

223223
if is_list_like(func) and not is_dict_like(func):
@@ -272,7 +272,7 @@ def transform_dict_like(self, func) -> DataFrame:
272272
obj = self.obj
273273
args = self.args
274274
kwargs = self.kwargs
275-
soo = False if self.by_row else True
275+
soo = not self.by_row
276276

277277
# transform is currently only for Series/DataFrame
278278
assert isinstance(obj, ABCNDFrame)
@@ -608,7 +608,7 @@ def apply_list_or_dict_like(self) -> DataFrame | Series:
608608
Result when self.func is a list-like or dict-like, None otherwise.
609609
"""
610610
if self.axis == 1 and isinstance(self.obj, ABCDataFrame):
611-
soo = False if self.by_row else True
611+
soo = not self.by_row
612612
return self.obj.T.apply(
613613
self.func, 0, args=self.args, series_ops_only=soo, **self.kwargs
614614
).T

Diff for: pandas/core/shared_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
1 1
381381
2 2
382382
dtype: int64
383-
>>> s.transform([np.sqrt, np.exp])
383+
>>> s.transform([np.sqrt, np.exp]) # doctest: +SKIP
384384
sqrt exp
385385
0 0.000000 1.000000
386386
1 1.000000 2.718282

0 commit comments

Comments
 (0)