-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
AssertionError from Series.append(DataFrame) with 1.0.0rc0 #30975
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
Comments
It's unclear what the expected behavior of Series.append(DataFrame) is. Removing these assertions for now. xref pandas-dev/pandas#30975
It's unclear what the expected behavior of Series.append(DataFrame) is. Removing these assertions for now. xref pandas-dev/pandas#30975
I agree. I think for this issue, we should restrict to improving the error message to something like
and a note in the whatsnew that this now raises an enhancement to accept a DataFrame could be raised as a separate issue and could be discussed there. |
#30975 (#31267) Co-authored-by: Harshavardhan Bachina <[email protected]>
Code Sample, a copy-pastable example if possible
The behavior of the following changed with 1.0.0rc0
On 0.25.3, we have
On 1.0.0rc0, we have
Problem description
I don't think the behavior of 0.25.3 is necessarily correct. I would expect either a TypeError from passing a DataFrame to Series.append, or something like
where the name of the Series is aligned with the DataFrame. We clearly document that the elements passed to append should be Series, so IMO we should raise.
The text was updated successfully, but these errors were encountered: