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

REF/POC: Share groupby/series algos (rank) #38744

Merged
merged 20 commits into from
Jan 1, 2021
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
13 changes: 13 additions & 0 deletions asv_bench/benchmarks/frame_methods.py
Original file line number Diff line number Diff line change
@@ -597,6 +597,19 @@ def time_frame_quantile(self, axis):
self.df.quantile([0.1, 0.5], axis=axis)


class Rank:
param_names = ["dtype"]
params = [
["int", "uint", "float", "object"],
]

def setup(self, dtype):
self.df = DataFrame(np.random.randn(10000, 10), columns=range(10), dtype=dtype)

def time_rank(self, dtype):
self.df.rank()


class GetDtypeCounts:
# 2807
def setup(self):
1 change: 0 additions & 1 deletion asv_bench/benchmarks/groupby.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@
"skew",
"cumprod",
"cummax",
"rank",
"pct_change",
"min",
"var",
14 changes: 14 additions & 0 deletions asv_bench/benchmarks/series_methods.py
Original file line number Diff line number Diff line change
@@ -349,4 +349,18 @@ def time_func(self, func, N, dtype):
self.func()


class Rank:

param_names = ["dtype"]
params = [
["int", "uint", "float", "object"],
]

def setup(self, dtype):
self.s = Series(np.random.randint(0, 1000, size=100000), dtype=dtype)

def time_rank(self, dtype):
self.s.rank()


from .pandas_vb_common import setup # noqa: F401 isort:skip
Loading