-
Notifications
You must be signed in to change notification settings - Fork 6
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
Metadata lost on multiplication #35
Labels
Subclassing
Subclassing pandas data structures
Comments
Workaround for the particular case when needing to switch signs:
Or when you need to switch from negative to positive values:
|
Branch issue-35-Metadata_lost_on_multiplication created! |
Flix6x
added a commit
that referenced
this issue
Dec 21, 2020
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
added a commit
that referenced
this issue
Dec 21, 2020
This PR drops support for pandas<1.1.5 and adds various tests to ensure metadata is propagated on various operations. Specific code changes: - Every constructor now calls finalize. - for_each_belief_ is no longer passed self as the df to work on. * Call finalize in all constructors to inherit metadata. Prepare tests for upcoming pandas==1.1.1 functionality: inherit metadata when resampling and grouping. * Update reference in test. Add pandas test. * Finish rebase. * Complete the ordering of BeliefSources by name. * Fix computation order. * Workaround for aggregation function when resampling. * Fix tests: - Separate tests for mean resampling and aggregate resampling. - Separate tests for temporary attributes and subclass attributes. - Test metadata propagation for groupby of subclassed DataFrames. * Update pandas dependency. Drop support for pandas<1.1.5. Bump timely-beliefs version with major release. * Prepare dtype test for empty frames. * Add comment about which pandas version fixed test_groupby_retains_metadata. * Rename downsampling function. * Simplify calls to for_each_belief. * Fix plotting integer values (int64 is not JSON serializable). * Add reference in test docs to relevant pandas issue. * Issue 35 metadata lost on multiplication (#43) 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]> Co-authored-by: Felix Claessen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, when switching signs:
The text was updated successfully, but these errors were encountered: