Skip to content

ASV: DataFrame.__setitem__ performance with object dtype #55938

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

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions asv_bench/benchmarks/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,18 @@ def time_setitem_list(self):
self.df[[100, 200, 300]] = 100


class SetitemObjectDtype:
# GH#19299

def setup(self):
N = 1000
cols = 500
self.df = DataFrame(index=range(N), columns=range(cols), dtype=object)

def time_setitem_object_dtype(self):
self.df.loc[0, 1] = 1.0


class ChainIndexing:
params = [None, "warn"]
param_names = ["mode"]
Expand Down