(self)
| 707 | return meta |
| 708 | |
| 709 | def _lower(self): |
| 710 | args = [ |
| 711 | self.frame, |
| 712 | self.operand("columns"), |
| 713 | self.operand("index"), |
| 714 | self.operand("values"), |
| 715 | ] |
| 716 | if self.aggfunc == "sum": |
| 717 | return PivotTableSum(*args) |
| 718 | elif self.aggfunc == "mean": |
| 719 | return PivotTableSum(*args) / PivotTableCount(*args) |
| 720 | elif self.aggfunc == "count": |
| 721 | return PivotTableCount(*args) |
| 722 | elif self.aggfunc == "first": |
| 723 | return PivotTableFirst(*args) |
| 724 | elif self.aggfunc == "last": |
| 725 | return PivotTableLast(*args) |
| 726 | else: |
| 727 | raise NotImplementedError(f"{self.aggfunc=} is not implemented") |
| 728 | |
| 729 | |
| 730 | class PivotTableAbstract(ApplyConcatApply): |
nothing calls this directly
no test coverage detected