Skip to content

Conversation

loicdiridollou
Copy link
Member

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see if we could not just use a generic dict here. We would not want to allow something like df.loc[0] =df.loc[0] = {"X": pd.Series([1,2,3])} Maybe Mapping[Hashable, Scalar | NAType | NaTType) would be a better type.

@loicdiridollou
Copy link
Member Author

Indeed that will be a bit more restrictive and avoid weird inputs.

@loicdiridollou loicdiridollou requested a review from Dr-Irv April 28, 2025 00:35
Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dr-Irv Dr-Irv merged commit ec745ff into pandas-dev:main Apr 28, 2025
13 checks passed
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.

__setitem__ should accept a dictionary

2 participants