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

Resolve Pandas 2.2 (FutureWarning) issues #684

Merged
merged 19 commits into from
Feb 19, 2024
Merged

Resolve Pandas 2.2 (FutureWarning) issues #684

merged 19 commits into from
Feb 19, 2024

Conversation

martinvonk
Copy link
Collaborator

@martinvonk martinvonk commented Feb 12, 2024

Short Description

This PR solves many of the future warning for Pandas 2.2 in advance to 3.0.

Related to issue #629

@martinvonk martinvonk marked this pull request as draft February 12, 2024 13:13
ValueError: duplicate time-indexes were found in the time series GWL. Make sure there are no duplicate indices. For example by `grouped = series.groupby(level=0); series = grouped.mean()`or `series = series.loc[~series.index.duplicated(keep='first/last')]`
Copy link

codacy-production bot commented Feb 16, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.17% (target: +0.00%) 96.08%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5251c97) 5991 4468 74.58%
Head commit (1071845) 5999 (+8) 4484 (+16) 74.75% (+0.17%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#684) 51 49 96.08%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

@martinvonk
Copy link
Collaborator Author

You want to merge this @raoulcollenteur before #686? I was not able to fix the FutureWarnings yet. That takes more time. But I did fix the failing test with Pandas. But if we merge this now, we can support more pandas versions in Pastas v1.4..

@martinvonk martinvonk marked this pull request as ready for review February 16, 2024 08:54
@martinvonk
Copy link
Collaborator Author

I added all FutureWarnings I found to #72. I have a feeling most things will be deprecated for Pandas 3.0 so we could add Pandas < 3.0 in the dependencies list.

@martinvonk martinvonk changed the title Fix Pandas FutureWarnings Resolve minor Pandas issues Feb 16, 2024
@martinvonk martinvonk changed the title Resolve minor Pandas issues Resolve minor Pandas (FutureWarning) issues Feb 16, 2024
@martinvonk
Copy link
Collaborator Author

Pandas 3.0 milestone is set for 1st of April: https://github.com/pandas-dev/pandas/milestone/102

@raoulcollenteur raoulcollenteur added this to the 1.4 milestone Feb 16, 2024
@martinvonk martinvonk linked an issue Feb 16, 2024 that may be closed by this pull request
@raoulcollenteur
Copy link
Member

@martinvonk perhaps you can have a quick look at this?

I also opened a new issue for Pandas 3.0 #687 to track changes necessary that only work with pandas > 2.1.

@raoulcollenteur raoulcollenteur changed the title Resolve minor Pandas (FutureWarning) issues Resolve Pandas 2.2 (FutureWarning) issues Feb 19, 2024
@martinvonk martinvonk merged commit 3c3ff14 into dev Feb 19, 2024
12 of 13 checks passed
@martinvonk martinvonk deleted the pandas2 branch February 19, 2024 10:00
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.

[BUG] Fix Future warnings with Pandas 2.1.0
2 participants