Nulls

Clean.drop_nan(col: str = None, method: str = 'all', **kwargs)

Drop rows with NaN values from the main dataframe

Parameters:
  • col (str, optional) – name of the column, defaults to None. Drops in
  • method (str, optional) – how param for df.dropna, defaults to “all”
  • **kwargs (optional) – params for df.dropna
Example:

ds.drop_nan("mycol")

Clean.nan_empty(col: str)

Fill empty values with NaN values

Parameters:col (str) – name of the colum
Example:ds.nan_empty("mycol")
Clean.zero_nan(*cols)

Converts zero values to nan values in selected columns

Parameters:*cols (str, at least one) – names of the colums
Example:ds.zero_nan("mycol1", "mycol2")
Clean.fill_nan(val: str, *cols)

Fill NaN values with new values in the main dataframe

Parameters:
  • val (str) – new value
  • *cols (str, at least one) – names of the colums
Example:

ds.fill_nan("new value", "mycol1", "mycol2")

Clean.fill_nulls(col: str)

Fill all null values with NaN values in a column. Null values are None or en empty string

Parameters:col (str) – column name
Example:ds.fill_nulls("mycol")