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

Add capability to concat two FileContainers #126

Merged
merged 12 commits into from
Nov 7, 2024

Conversation

veni-vidi-vici-dormivi
Copy link
Collaborator

@veni-vidi-vici-dormivi veni-vidi-vici-dormivi commented Nov 6, 2024

Very simple method to concatenate two FileContainers together by concatenating there DataFrames.
Closes #94

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.68%. Comparing base (c17e2fd) to head (d3422f3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #126   +/-   ##
=======================================
  Coverage   99.67%   99.68%           
=======================================
  Files           5        5           
  Lines         308      317    +9     
=======================================
+ Hits          307      316    +9     
  Misses          1        1           
Flag Coverage Δ
unittests 99.68% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@mathause mathause left a comment

Choose a reason for hiding this comment

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

Nice! Do we worry about duplicates?

filefinder/_filefinder.py Outdated Show resolved Hide resolved
@veni-vidi-vici-dormivi
Copy link
Collaborator Author

Do we worry about duplicates?

Good question, we could add an option remove_duplicates=True ?

@mathause mathause mentioned this pull request Nov 7, 2024
@mathause
Copy link
Collaborator

mathause commented Nov 7, 2024

Good idea, with True as default

@mathause
Copy link
Collaborator

mathause commented Nov 7, 2024

or maybe drop_duplicates check what pandas does

@veni-vidi-vici-dormivi
Copy link
Collaborator Author

In pd.concat they use verify_integrity and if there are duplicates, they raise a ValueError... not too happy with that tbh.

@veni-vidi-vici-dormivi
Copy link
Collaborator Author

veni-vidi-vici-dormivi commented Nov 7, 2024

But there is a pandas dataframe drop_duplicates method so that's certainly the better name.

Copy link
Collaborator

@mathause mathause left a comment

Choose a reason for hiding this comment

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

Great!

filefinder/tests/test_filecontainer.py Outdated Show resolved Hide resolved
filefinder/tests/test_filecontainer.py Outdated Show resolved Hide resolved
@veni-vidi-vici-dormivi veni-vidi-vici-dormivi merged commit c8e8256 into mpytools:main Nov 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to combine Filecontainers
2 participants