anishmehta24 commented on code in PR #40571: URL: https://github.com/apache/beam/pull/40571#discussion_r4294268864
########## sdks/python/apache_beam/dataframe/frames.py: ########## @@ -1589,7 +1589,9 @@ def dot(self, other): @frame_base.with_docs_from(pd.Series) @frame_base.args_to_kwargs(pd.Series) @frame_base.populate_defaults(pd.Series) - def nunique(self, **kwargs): + def nunique(self, dropna, **kwargs): Review Comment: No, callers see the same signature as pandas, `Series.nunique(dropna=True)`. `args_to_kwargs` maps arguments by the pandas signature, and `populate_defaults` only fills defaults for parameters the method names, so `dropna` has to be listed to get its default of `True`. Before, it went into `**kwargs` and was ignored. `nunique()`, `nunique(False)`, `nunique(True)` and `nunique(dropna=False)` all match pandas (checked with `_run_test`). It's the same pattern as `quantile(self, q, **kwargs)`. ########## CHANGES.md: ########## @@ -104,8 +104,12 @@ * (Python) Fixed stateful DoFns with side inputs sometimes taking the timer key coder from a side input instead of the main input, which could make the worker fail to decode timer keys with `Unknown type tag` ([#40374](https://github.com/apache/beam/issues/40374)). * (Python) `Duration` built from float seconds now rounds to the nearest microsecond instead of truncating, which could lose a microsecond ([#40263](https://github.com/apache/beam/issues/40263)). * (Python) `ReadFromText` with `escapechar` no longer skips a delimiter that directly follows an escaped delimiter, which merged two records into one ([#40459](https://github.com/apache/beam/issues/40459)). +<<<<<<< ours Review Comment: Sorry, conflict markers slipped in when I rebased. Rebased on master and fixed in 4d80dbe. -- 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]
