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

Adding Comparison and Indexing methods to DataFrameMixin #58

Merged
merged 35 commits into from
Aug 14, 2024

Conversation

adamamer20
Copy link
Collaborator

This PR adds some useful methods for comparing DFs with other DFs or Series.
New methods:

  • Logical operations: and, or
  • Mathematical operations: less than (lt), greater-or-equal (ge) and modulus (mod)
  • Indexing methods: index (same as pandas.index) and reindex (same as pandas.reindex)

adamamer20 and others added 30 commits August 4, 2024 12:51
@adamamer20 adamamer20 self-assigned this Aug 13, 2024
@adamamer20 adamamer20 added the enhancement Improvements to existing features or performance. label Aug 13, 2024
@adamamer20 adamamer20 added this to the 0.1.0 Alpha Release milestone Aug 13, 2024
@adamamer20 adamamer20 requested a review from rht August 13, 2024 16:20
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 89.04110% with 16 lines in your changes missing coverage. Please review.

Files Patch % Lines
mesa_frames/concrete/polars/mixin.py 88.17% 11 Missing ⚠️
mesa_frames/concrete/pandas/mixin.py 84.84% 5 Missing ⚠️
Files Coverage Δ
mesa_frames/abstract/mixin.py 100.00% <100.00%> (ø)
mesa_frames/abstract/space.py 89.51% <100.00%> (+0.07%) ⬆️
mesa_frames/concrete/pandas/mixin.py 86.26% <84.84%> (-0.41%) ⬇️
mesa_frames/concrete/polars/mixin.py 90.25% <88.17%> (+63.97%) ⬆️

@rht
Copy link
Contributor

rht commented Aug 13, 2024

Was wondering, is this feature a dependency of Sugarscape IG? If not, under which situation can this be showcased?

@adamamer20
Copy link
Collaborator Author

Was wondering, is this feature a dependency of Sugarscape IG? If not, under which situation can this be showcased?

It's a dependency for GridPolars. Polars DFs do not have mathematical operators (like *, /, +), logical operators (like |, &) or indexes, differently from pandas. This PR bridges the gap, since I used some operators in GridDF. Look here

@adamamer20 adamamer20 merged commit abb4459 into main Aug 14, 2024
7 checks passed
@adamamer20 adamamer20 deleted the comparisons-mixin branch August 14, 2024 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features or performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants