Repository navigation
Collect the observations into a pandas DataFrame - #58
Merged
Merged
Conversation
Fixes #4. Everyone who wants the observations in pandas has been writing the same loop, and the two in the report do not agree - the first one breaks on the timeseries layout, where the times are a list rather than a measurement. MultiPoint knows which layout it holds, so it can do the conversion itself. to_dataframe() gives a frame indexed by time and station with a column per parameter, built from either layout and giving the same frame for both. The units and the station coordinates go into frame.attrs, there being nowhere else for them, and exclude_empty=True drops the parameters that a bounding box returned but nothing in it measures. pandas is an optional dependency. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014exvkg8KnHXXTw1hPzbFcq
Two conflicts, both of them the same shape: main has grown the NetCDF support since this branch started, and each side added its own optional dependency and the installation note that goes with it. Both belong there, so both are kept - "netcdf" and "pandas" as extras, with "all" pulling in the two of them along with rasterio and eccodes, and the README describing each install in turn. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014exvkg8KnHXXTw1hPzbFcq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4.
Everyone who wants the observations in pandas has been writing the same loop, and the two in the report do not agree - the first one breaks on the timeseries layout, where the times are a list rather than a measurement. MultiPoint knows which layout it holds, so it can do the conversion itself.
to_dataframe() gives a frame indexed by time and station with a column per parameter, built from either layout and giving the same frame for both. The units and the station coordinates go into frame.attrs, there being nowhere else for them, and exclude_empty=True drops the parameters that a bounding box returned but nothing in it measures. pandas is an optional dependency.
Claude-Session: https://claude.ai/code/session_014exvkg8KnHXXTw1hPzbFcq