-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
#50990 Increase to_dict('list') performance #54824
Conversation
pandas/core/methods/to_dict.py
Outdated
) | ||
for i, (k, v) in enumerate(df.items()) | ||
for i, col in enumerate(df.columns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test where to_dict("list")
is called on a DataFrame with duplicate column labels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the catch, didin think about it
Thanks @taytzehao |
* autoformat * autoformat * whatsnew * reformat * rm values * to_numpy() * to_numpy() * rm newline * .items * unit test * comment
doc/source/whatsnew/v2.1.0.rst
file if fixing a bug or adding a new feature.25.8±2ms 1.61±0.4ms 0.06 frame_methods.ToDict.time_to_dict_datetimelike('list')