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

BUG: frame_length_0[key] = nonempty_frame raises ValueError #38831

Closed
jbrockmendel opened this issue Dec 30, 2020 · 0 comments · Fixed by #38931
Closed

BUG: frame_length_0[key] = nonempty_frame raises ValueError #38831

jbrockmendel opened this issue Dec 30, 2020 · 0 comments · Fixed by #38931
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jbrockmendel
Copy link
Member

df = pd.DataFrame(columns=["A", "B"])

other = pd.DataFrame({"B": [1, 2]})

>>> df["B"] = other
ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series

>>> df[["B"]] = other   # <-- works as expected
@jbrockmendel jbrockmendel added Bug Indexing Related to indexing on series/frames, not to indexes themselves Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 30, 2020
@rhshadrach rhshadrach removed the Needs Triage Issue that has not been reviewed by a pandas team member label Jan 2, 2021
@rhshadrach rhshadrach added this to the Contributions Welcome milestone Jan 2, 2021
@jreback jreback modified the milestones: Contributions Welcome, 1.3 Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
3 participants