itholic commented on a change in pull request #33646:
URL: https://github.com/apache/spark/pull/33646#discussion_r684020042
##########
File path: python/pyspark/pandas/window.py
##########
@@ -706,6 +706,10 @@ def _apply_as_series_or_frame(self, func:
Callable[[Column], Column]) -> FrameLi
if groupby._agg_columns_selected:
agg_columns = groupby._agg_columns
else:
+ # pandas doesn't keep the groupkey as a column from 1.3 for
DataFrameGroupBy
+ if isinstance(groupby, DataFrameGroupBy):
+ for groupkey in groupby._groupkeys: # type: ignore
+
groupby._column_labels_to_exlcude.add(groupkey._internal.column_labels[0])
Review comment:
Should we rename the from `exlcude` to `exclude` in this PR, too. ??
It's typo.
##########
File path: python/pyspark/pandas/window.py
##########
@@ -706,6 +706,10 @@ def _apply_as_series_or_frame(self, func:
Callable[[Column], Column]) -> FrameLi
if groupby._agg_columns_selected:
agg_columns = groupby._agg_columns
else:
+ # pandas doesn't keep the groupkey as a column from 1.3 for
DataFrameGroupBy
+ if isinstance(groupby, DataFrameGroupBy):
+ for groupkey in groupby._groupkeys: # type: ignore
+
groupby._column_labels_to_exlcude.add(groupkey._internal.column_labels[0])
Review comment:
btw, should we rename the from `exlcude` to `exclude` in this PR, too.
?? It's typo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]