def get_data(self, simulation_step=None, error_category=None):
        """
        Parameters
        ----------
        simulation_step: if not given, returns a raw report
        error_category: if only one argument is specified, swaps dataframe report
        """
        if simulation_step is None and error_category is None:
            return self._df.dropna(axis="rows", how="all")

        if simulation_step is not None:
            if simulation_step not in self._simulation_step_list:
                raise RuntimeError("The simulation_step '%s' is not referred in the error file." % simulation_step)

            if error_category is not None:
                if error_category not in self.CATEGORIES:
                    raise RuntimeError("The error_cat '%s' is wrong." % error_category)
                iterables = [simulation_step, error_category]
                columns = pd.MultiIndex.from_product(iterables)
                series = self._df[simulation_step][error_category].dropna(axis="rows", how="all")

                df = pd.DataFrame(index=series.index, columns=columns)
                df[simulation_step] = series
                return df

            return self._df[simulation_step].dropna(axis="rows", how="all")

        if error_category is not None:
            if error_category not in self.CATEGORIES:
                raise RuntimeError("The error_category '%s' is wrong." % error_category)
            df = self._df.copy()
            df.columns = df.columns.swaplevel(0, 1)
            return df[error_category].dropna(axis="rows", how="all")
def get_data(self, simulation_step=None, error_category=None):
        """
        Parameters
        ----------
        simulation_step: if not given, returns a raw report
        error_category: if only one argument is specified, swaps dataframe report
        """
        if simulation_step is None and error_category is None:
            return self._df.dropna(axis="rows", how="all")

        if simulation_step is not None:
            if simulation_step not in self._simulation_step_list:
                raise RuntimeError("The simulation_step '%s' is not referred in the error file." % simulation_step)

            if error_category is not None:
                if error_category not in self.CATEGORIES:
                    raise RuntimeError("The error_cat '%s' is wrong." % error_category)
                iterables = [simulation_step, error_category]
                columns = pd.MultiIndex.from_product(iterables)
                series = self._df[simulation_step][error_category].dropna(axis="rows", how="all")

                df = pd.DataFrame(index=series.index, columns=columns)
                df[simulation_step] = series
                return df

            return self._df[simulation_step].dropna(axis="rows", how="all")

        if error_category is not None:
            if error_category not in self.CATEGORIES:
                raise RuntimeError("The error_category '%s' is wrong." % error_category)
            df = self._df.copy()
            df.columns = df.columns.swaplevel(0, 1)
            return df[error_category].dropna(axis="rows", how="all")
def get_data ( self , simulation_step = None , error_category = None ) : if simulation_step is None and error_category is None : return self . _df . dropna ( axis = "rows" , how = "all" ) if simulation_step is not None : if simulation_step not in self . _simulation_step_list : raise RuntimeError ( "The simulation_step '%s' is not referred in the error file." % simulation_step ) if error_category is not None : if error_category not in self . CATEGORIES : raise RuntimeError ( "The error_cat '%s' is wrong." % error_category ) iterables = [ simulation_step , error_category ] columns = pd . MultiIndex . from_product ( iterables ) series = self . _df [ simulation_step ] [ error_category ] . dropna ( axis = "rows" , how = "all" ) df = pd . DataFrame ( index = series . index , columns = columns ) df [ simulation_step ] = series return df return self . _df [ simulation_step ] . dropna ( axis = "rows" , how = "all" ) if error_category is not None : if error_category not in self . CATEGORIES : raise RuntimeError ( "The error_category '%s' is wrong." % error_category ) df = self . _df . copy ( ) df . columns = df . columns . swaplevel ( 0 , 1 ) return df [ error_category ] . dropna ( axis = "rows" , how = "all" )
Parameters
        ----------
        simulation_step: if not given, returns a raw report
        error_category: if only one argument is specified, swaps dataframe report
Parameters ---------- simulation_step : if not given returns a raw report error_category : if only one argument is specified swaps dataframe report