From 4390bba8c6634c07aac0a63d753d24a472ed7b68 Mon Sep 17 00:00:00 2001 From: jzsmoreno <42299052+jzsmoreno@users.noreply.github.com> Date: Fri, 19 Jan 2024 01:23:27 -0600 Subject: [PATCH] Update `health.py` * minor change --- pydbsmgr/health.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pydbsmgr/health.py b/pydbsmgr/health.py index 9bd1865..92394cc 100644 --- a/pydbsmgr/health.py +++ b/pydbsmgr/health.py @@ -17,7 +17,7 @@ class FrameCheck: - """Class for checking and transforming a dataframe""" + """Class for checking and transforming a `DataFrame`/dataframes""" def __init__(self, _df: DataFrame | List[DataFrame], df_names: str | List[str] = None) -> None: self.df_names = df_names @@ -53,12 +53,6 @@ def fix(self, cols_upper_case: bool = False, drop_empty_cols: bool = True) -> No def get_frames(self) -> List[DataFrame]: return self._dfs - def get_frame(self) -> DataFrame: - try: - return self.df - except AttributeError: - raise Exception("No specific frame has been set yet. Use 'generate_report' method") - def generate_report( self, report_name: str = "./report.html", @@ -155,7 +149,7 @@ def generate_report( self._create_yaml_tree() @abstractmethod - def _ops_dtypes(self, df, count) -> None: + def _ops_dtypes(self, df, count) -> DataFrame: """Processing of data types""" df = check_dtypes(df, df.dtypes) logger.info(f"{count+1}) The data type has been verified.")