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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: possible vs used count - if all are used, the 'failed' series is 0 length leading to NaN #27

Closed
hkershaw-brown opened this issue Dec 19, 2024 · 2 comments · Fixed by #28
Labels
bug Something isn't working

Comments

@hkershaw-brown
Copy link
Member

The series are different lengths, pandas cannot find a corresponding index in the two series leading to a NaN

Screenshot 2024-12-19 at 9 10 54 AM

@hkershaw-brown hkershaw-brown added the bug Something isn't working label Dec 19, 2024
@hkershaw-brown
Copy link
Member Author

reproducer: you can use https://github.com/NCAR/pyDARTdiags/blob/main/tests/data/obs_seq.1d.final to see this (lorenz_96 all obs have a good QC)

@hkershaw-brown hkershaw-brown changed the title bug: possible vs used count - if all are used, the 'used' series is 0 length leading to NaN bug: possible vs used count - if all are used, the 'failed' series is 0 length leading to NaN Dec 19, 2024
@hkershaw-brown
Copy link
Member Author

hkershaw-brown commented Dec 19, 2024

Need to have 0 as a fill value
used = possible - failed_qcs.reindex(possible.index, fill_value=0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant