Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count documentation #8057

Merged
merged 4 commits into from Aug 9, 2023
Merged

Count documentation #8057

merged 4 commits into from Aug 9, 2023

Conversation

Articoking
Copy link
Contributor

@Articoking Articoking commented Aug 8, 2023

I've changed the example to include a 0 value which clearly shows that only NA values are ignored in the count. I've only modified the "see also" section for count since as mentioned in #8055 it is a bit of an outlier among the aggregation methods. I believe that this is not a long term fix since the single line summary of the method is of little use, but at least with this no one will have to take a look at the source code to quickly get what count does.

Feel free to correct any problems or suggest any changes, as I am quite new to contributing to projects like this and have little idea of what I'm doing 馃槄

@welcome
Copy link

welcome bot commented Aug 8, 2023

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@dcherian
Copy link
Contributor

dcherian commented Aug 8, 2023

Feel free to correct any problems or suggest any changes, as I am quite new to contributing to projects like this and have little idea of what I'm doing

Looks like you did really well. Thanks!

I believe that this is not a long term fix since the single line summary of the method is of little use, but at least with this no one will have to take a look at the source code to quickly get what count does.

Are you interested in adding a description field to Method? We can also just get to it later :)

Copy link
Collaborator

@headtr1ck headtr1ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
You can add an entry in whats-new:)

I guess long term we should clean up the generation script a bit and remove all the special casings with dicts (or default dicts). But that's another PR.

xarray/util/generate_aggregations.py Outdated Show resolved Hide resolved
@Articoking
Copy link
Contributor Author

Are you interested in adding a description field to Method? We can also just get to it later :)

I would be glad to do so if I find the time in the next few days! Should such a field be used only for count or should I try to write a custom signature for each method?

@dcherian
Copy link
Contributor

dcherian commented Aug 9, 2023

Should such a field be used only for count or should I try to write a custom signature for each method?

#7378 suggests that most, if not all, methods would benefit from an extra line or two.

I'll merge this one since it's a pretty good upgrade already. Thanks!

@dcherian dcherian merged commit eceec5f into pydata:main Aug 9, 2023
29 checks passed
@welcome
Copy link

welcome bot commented Aug 9, 2023

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation of Dataset.count() is ambiguous
3 participants