INNER CODE UNIT · Python

_cleaned_summary_cols

HHammond/PrettyPandas · prettypandas/summarizer.py:159

    def _cleaned_summary_cols(self):
        return list(self._cleaned_aggregates(self.summary_cols))

    def _apply_summaries(self):
        """Add all summary rows and columns."""

        def as_frame(r):
            if isinstance(r, pd.Series):
                return r.to_frame()
            else:
                return r

        df = self.data

        if df.index.nlevels > 1:
            raise ValueError(
                "You cannot currently have both summary rows and columns on a "
                "MultiIndex."

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…