def get_data(self, simulation_step=None, error_category=None):
if simulation_step is None and error_category is None:<EOL><INDENT>return self._df.dropna(axis="<STR_LIT>", how="<STR_LIT:all>")<EOL><DEDENT>if simulation_step is not None:<EOL><INDENT>if simulation_step not in self._simulation_step_list:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % simulation_step)<EOL><DEDENT>if error_category is not None:<EOL><INDENT>if error_category not in self.CATEGORIES:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % error_category)<EOL><DEDENT>iterables = [simulation_step, error_category]<EOL>columns = pd.MultiIndex.from_product(iterables)<EOL>series = self._df[simulation_step][error_category].dropna(axis="<STR_LIT>", how="<STR_LIT:all>")<EOL>df = pd.DataFrame(index=series.index, columns=columns)<EOL>df[simulation_step] = series<EOL>return df<EOL><DEDENT>return self._df[simulation_step].dropna(axis="<STR_LIT>", how="<STR_LIT:all>")<EOL><DEDENT>if error_category is not None:<EOL><INDENT>if error_category not in self.CATEGORIES:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % error_category)<EOL><DEDENT>df = self._df.copy()<EOL>df.columns = df.columns.swaplevel(<NUM_LIT:0>, <NUM_LIT:1>)<EOL>return df[error_category].dropna(axis="<STR_LIT>", how="<STR_LIT:all>")<EOL><DEDENT>
Parameters
----------
simulation_step: if not given, returns a raw report
error_category: if only one argument is specified, swaps dataframe report