Skip to content

Commit

Permalink
Update health.py
Browse files Browse the repository at this point in the history
* minor change
  • Loading branch information
jzsmoreno committed Jan 19, 2024
1 parent d1da1db commit 4390bba
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pydbsmgr/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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.")
Expand Down

0 comments on commit 4390bba

Please sign in to comment.