Fix failing tests: Add compatibility with pandas 2 #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #84
Compatibility with pandas 2
Problem:
For a pandas dataframe that contains both numeric and string columns, the
mean()
function started to fail in pandas 2.0+ because the default behavior has changed frommean(numeric_only=True)
tomean(numeric_only=False)
(link).Solution:
Ensure we only have numeric columns.
Testing:
pandas
dependency in both environments: [GEOParse] Non-breaking change compatible with pandas 1.3.0 and 2.2.2Compatibility with tox 4
1. Whitespace in the environmental variables
With tox==4.16.0, the
tox
command was failing with the following error:The modified line also works in tox==3.14.3 (Dec 28, 2019). However, I couldn't run tox==3.13.0 (Jun 25, 2019) regardless of this line.
2. Explicit
lxml
dependencyWithout the
lxml
dependency, 3 tests were failing: