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

functions.py: fix test failure with pandas 2.0 #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emollier
Copy link
Contributor

@emollier emollier commented Sep 6, 2023

As seen in Debian bug #1044070, the module pauvre sees the below test failure:

  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_pauvre/build/pauvre/functions.py", line 75, in __init__
    self.features.drop('dunno1', 1, inplace=True)
TypeError: DataFrame.drop() takes from 1 to 2 positional arguments but 3 positional arguments (and 1 keyword-only argument) were given

Upon analysis, this looks to be caused by a subtle but fatal (and unfortunately undocumented) change in pandas.DataFram.drop signature. Explicitly specifying the axis= argument looks to correct the issue.

As seen in [Debian bug #1044070], the module pauvre sees the below
test failure:

	  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_pauvre/build/pauvre/functions.py", line 75, in __init__
	    self.features.drop('dunno1', 1, inplace=True)
	TypeError: DataFrame.drop() takes from 1 to 2 positional arguments but 3 positional arguments (and 1 keyword-only argument) were given

Upon analysis, this looks to be caused by a subtle but fatal (and
unfortunately undocumented) change in pandas.DataFram.drop signature.
Explicitly specifying the axis= argument looks to correct the issue.

[Debian bug #1044070]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1044070

Signed-off-by: Étienne Mollier <emollier@debian.org>
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.

None yet

1 participant