There is a new pandas release (2.0.0) and then some test cases of the library start failing with errors like
"TypeError: DataFrame.drop() takes from 1 to 2 positional arguments but 3 were given".
"AttributeError: 'Series' object has no attribute 'append'"
Per investigation the rootcause is that the pandas 2.0 deprecated non-keyword arguments of several methods including drop(), and it also deprecated Series.append.
The PR has two commits,
The first commit fixes the problems by
using keyword arguments for the drop method
using pandas.concat() to replace the Series.append() method
The second commit bumps up the package version number to 0.5 for the new release.
Testing Done
devtool all and devtool integ_tests
Tried the tests with pandas 1.4.x, pandas 1.5.x and pandas 2.0.x
Without the fix: with pandas 2.0.0, the tests failed with the type error and the attribute error
With the fix: the tests passed with all three versions.
Clarify container test
Tried the tests with both pandas 1.4.x, "devtool all" passed.
Issue, if available:
https://tiny.amazon.com/kzvlpcax
Description of changes:
There is a new pandas release (2.0.0) and then some test cases of the library start failing with errors like
Per investigation the rootcause is that the pandas 2.0 deprecated non-keyword arguments of several methods including drop(), and it also deprecated Series.append.
The PR has two commits,
Testing Done
devtool all
anddevtool integ_tests
Tried the tests with pandas 1.4.x, pandas 1.5.x and pandas 2.0.x
Clarify container test
Tried the tests with both pandas 1.4.x, "devtool all" passed.
Test cases in DLC repository
Here is the test code
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.