INNER CODE UNIT · Python
frame
HHammond/PrettyPandas · prettypandas/summarizer.py:193
def frame(self):
"""Add summaries and convert back to DataFrame"""
return self._apply_summaries()
def to_frame(self):
"""Add summaries and convert back to DataFrame"""
return self.frame
@property
def style(self):
"""Add summaries and convert to Pandas Styler"""
row_titles = [a.title for a in self._cleaned_summary_rows]
col_titles = [a.title for a in self._cleaned_summary_cols]
row_ix = pd.IndexSlice[row_titles, :]
col_ix = pd.IndexSlice[:, col_titles]
def handle_na(df):
df.loc[col_ix] = df.loc[col_ix].fillna('')