MCPcopy
hub / github.com/pandas-dev/pandas / String

Class String

asv_bench/benchmarks/groupby.py:741–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739
740
741class String:
742 # GH#41596
743 param_names = ["dtype", "method"]
744 params = [
745 ["str", "string[python]"],
746 [
747 "sum",
748 "min",
749 "max",
750 "first",
751 "last",
752 "any",
753 "all",
754 ],
755 ]
756
757 def setup(self, dtype, method):
758 cols = list("abcdefghjkl")
759 self.df = DataFrame(
760 np.random.randint(0, 100, size=(10_000, len(cols))),
761 columns=cols,
762 dtype=dtype,
763 )
764
765 def time_str_func(self, dtype, method):
766 self.df.groupby("a")[self.df.columns[1:]].agg(method)
767
768
769class Categories:

Callers 3

iris_table_metadataFunction · 0.85
test_dtypeFunction · 0.85
TestClass · 0.85

Calls

no outgoing calls

Tested by 2

iris_table_metadataFunction · 0.68
test_dtypeFunction · 0.68