-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional output of Stats.min and Stats.max on series #419
Comments
Yes, I would be in favour of a breaking change and just returning The only caveat is that returning |
Forgot about integers. I'm afraid this breaking change requires try catch if anybody has implementation with min/max on integer series already. Another option is to rename the current min/max with tryMin/tryMax. A new implementation of min and max can output NaN or throw an exception for integers. |
Renaming to |
Closed as it's addressed in #422 |
Stats.min and Stats.max on Series returns optional values by calling trySeriesExtreme. It returns None when the series is empty.
But this is the only stats function in the whole Stats module that returns optional value. Functions such as Stats.mean returns NaN when series is empty. Applying Stats.min and Stats.max on frame will also output missing value if the column is empty, essentially NaN from user's perspective.
Shall we make Stats.min and Stats.max consistent with other functions to return NaN if series is empty? Then users can avoid confusion such as the following SO question https://stackoverflow.com/questions/51606395/deedle-f-find-the-max-rows-within-an-index-group/51611467#51611467
The text was updated successfully, but these errors were encountered: