anishmehta24 opened a new pull request, #41874: URL: https://github.com/apache/beam/pull/41874
Fixes #41873 `var`, `skew` and `kurtosis` compute partition moments with pandas `std`, `sum` and `mean`, which skip NaN, while the row count includes it. With `skipna=True` the NaN rows are dropped first, but with `skipna=False` a NaN that shares a partition with other values is ignored, so the result is a number where pandas gives NaN. With `skipna=False` these methods now return NaN when the Series has any NaN, and otherwise the same result as before. `std` and `kurt` go through `var` and `kurtosis`, and `DataFrame.var/std(skipna=False)` through the Series methods, so they are fixed too. Added `test_moments_with_na_and_skipna_false` to frames_test.py (40 rows, so every NaN shares a test partition with other values). It fails on master. The apache_beam/dataframe tests and the Series, DataFrame, NDFrame and GroupBy pandas doctests pass. -- 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]
