INNER CODE UNIT · Python
_add_summary
HHammond/PrettyPandas · prettypandas/summarizer.py:130
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):
titles = set()
for agg in summaries:
title = agg.title
i = 1
while agg.title in titles: