| 739 | |
| 740 | |
| 741 | class 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 | |
| 769 | class Categories: |
no outgoing calls