eobox.raster.utils

eobox.raster.utils.cleanup_df_values_for_given_dtype(df, dtype, lower_as=None, higher_as=None, nan_as=None)[source]
eobox.raster.utils.dtype_checker_df(df, dtype, return_=None)[source]

Check if there are NaN values of values outside of a given datatype range.

Parameters
  • {dataframe} -- A dataframe. (df) –

  • {str} -- The datatype to check for. (dtype) –

Keyword Arguments

{str} -- Returns a boolean dataframe with the values not in the range of the dtype (return) – the row (‘rowsums’) or column (‘colsums’) sums of that dataframe or an exit code 1 (None, default) if any of the values is not in the range.

Returns

[int or DataFrame or Series] – If no value is out of the range exit code 0 is returned, else depends on return_.