Yikun commented on a change in pull request #34213:
URL: https://github.com/apache/spark/pull/34213#discussion_r733270913
##########
File path: python/pyspark/pandas/frame.py
##########
@@ -8201,6 +8202,185 @@ def update(self, other: "DataFrame", join: str =
"left", overwrite: bool = True)
internal = self._internal.with_new_sdf(sdf, data_fields=data_fields)
self._update_internal_frame(internal, requires_same_anchor=False)
+ def cov(self, min_periods: Optional[int] = None) -> "DataFrame":
Review comment:
There are a `ddof` arg in [pandas#def
cov](https://github.com/pandas-dev/pandas/blob/master/pandas/core/frame.py#L9581-L9585),
so better add a TODO in here.
BTW, for min_periods, I guess it's just to keep interface consist with
pandas, but I think:
1. it could change to `def cov(self, min_periods: Optional[int] = 1) ->
"DataFrame":`, and remove L8279
2. add a note on the min_periods doc(like `min_periods would be set to 1 if
min_periods is None.`) to explain what we extactly done.
--
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]