INNER CODE UNIT · Python
_add_formatter
HHammond/PrettyPandas · prettypandas/summarizer.py:125
def _add_formatter(self, formatter):
new = self._copy()
new.formatters += [formatter]
return new
def _add_summary(self, agg):
new = self._copy()
if _axis_is_rows(agg.axis):
new.summary_rows += [agg]
elif _axis_is_cols(agg.axis):
new.summary_cols += [agg]
else:
raise ValueError("Invalid axis supplied.")
return new
def _cleaned_aggregates(self, summaries):