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

Inherit metadata when resampling and grouping #23

Merged
merged 15 commits into from
Dec 21, 2020

Conversation

Flix6x
Copy link
Collaborator

@Flix6x Flix6x commented Aug 14, 2020

Call finalize in all constructors to inherit metadata.
Prepare tests for upcoming pandas==1.1.1 functionality: inherit metadata when resampling and grouping.

@Flix6x Flix6x added the Resampling Dealing with downsampling and/or upsampling label Aug 14, 2020
@Flix6x Flix6x self-assigned this Aug 14, 2020
@Flix6x Flix6x linked an issue Aug 14, 2020 that may be closed by this pull request
@Flix6x Flix6x added the Subclassing Subclassing pandas data structures label Nov 26, 2020
Prepare tests for upcoming pandas==1.1.1 functionality: inherit metadata when resampling and grouping.
Add pandas test.
- Separate tests for mean resampling and aggregate resampling.
- Separate tests for temporary attributes and subclass attributes.
- Test metadata propagation for groupby of subclassed DataFrames.
@Flix6x Flix6x force-pushed the resample-while-keeping-metadata branch from 2788bd7 to e72ef14 Compare December 9, 2020 16:23
Drop support for pandas<1.1.5.
Bump timely-beliefs version with major release.
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me! 👍

timely_beliefs/tests/test_belief_io.py Show resolved Hide resolved
timely_beliefs/beliefs/__init__.py Outdated Show resolved Hide resolved
timely_beliefs/beliefs/classes.py Outdated Show resolved Hide resolved
timely_beliefs/sources/classes.py Show resolved Hide resolved
timely_beliefs/tests/test_belief_io.py Outdated Show resolved Hide resolved
timely_beliefs/tests/test_belief_io.py Outdated Show resolved Hide resolved
@nhoening
Copy link
Contributor

Thanks for addressing all my comments!

Flix6x and others added 2 commits December 21, 2020 11:46
This PR adds no additional logic, only a test to check whether Issue #35 is successfully resolved (plus some refactoring of test util functions). Note that this is a merge into resample-while-keeping-metadata, and that branch (with PR #23) actually contains the logic that resolves this issue (as a side effect, because I was actually addressing deeper issues there: #22 and #26).

* Refactor metadata propagation checks to util function.

* Add test for metadata propagation upon multiplication (GH 35).

Co-authored-by: F.N. Claessen <[email protected]>
@Flix6x Flix6x merged commit 103fd2f into master Dec 21, 2020
@Flix6x Flix6x deleted the resample-while-keeping-metadata branch December 21, 2020 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resampling Dealing with downsampling and/or upsampling Subclassing Subclassing pandas data structures
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail with pandas==1.1(metadata lost on groupby) Lost metadata when resampling
2 participants