From d2624726459b4f1c3cf7cfd5aed04c9791946fea Mon Sep 17 00:00:00 2001 From: jgjuara Date: Mon, 15 Jul 2024 12:21:13 -0300 Subject: [PATCH] drop na transformer --- data_transformers/default_transformers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data_transformers/default_transformers.py b/data_transformers/default_transformers.py index 95e062c..293435c 100644 --- a/data_transformers/default_transformers.py +++ b/data_transformers/default_transformers.py @@ -57,6 +57,11 @@ def convert_indec_codes_to_isoprov(df: DataFrame, df_cod_col:str): return df @transformer.convert -def mutiplicar_por_escalar(df: DataFrame, col:str, k:float): +def multiplicar_por_escalar(df: DataFrame, col:str, k:float): df[col] = df[col]*k return df + +@transformer.convert +def drop_na(df:DataFrame, col:str): + df = df.dropna(subset=col, axis=0) + return df