ydata-profiling icon indicating copy to clipboard operation
ydata-profiling copied to clipboard

Feature Request

Open liyaskerj opened this issue 1 year ago • 1 comments

Missing functionality

As a frequent user of ydata_profiling am encountering the below issue

In the given dataset for the numeric datatype column we have to exclude empty cell while calculating 'sum'. When we are not including empty cells then the value of sum is coming as 'NaN'. From our side if we are replacing empty with '0' then it is impacting 'min' value, if we are replacing with some other value then it is impacting the data type of the corresponding column.

Proposed feature

we have to exclude empty or null cell of the numeric data type columns while calculating 'sum'. When we are not including empty cells then the value of sum is coming as 'NaN'

Alternatives considered

Below logic in describe_numeric_spark.py is the place where 'sum' is been is calculated. Please correct me if am wrong

@describe_numeric_1d.register def describe_numeric_1d_spark( config: Settings, df: DataFrame, summary: dict ) -> Tuple[Settings, DataFrame, dict]: """Describe a boolean series.

Args:
    series: The Series to describe.
    summary: The dict containing the series description so far.

Returns:
    A dict containing calculated series description values.
"""

stats = numeric_stats_spark(df, summary)
summary["min"] = stats["min"]
summary["max"] = stats["max"]
summary["mean"] = stats["mean"]
summary["std"] = stats["std"]
summary["variance"] = stats["variance"]
summary["skewness"] = stats["skewness"]
summary["kurtosis"] = stats["kurtosis"]
summary["sum"] = stats["sum"]

Additional context

We are building wheel file from our code and installing the same in databricks cluster and trying to do exploratory data analysis of the given source dataset in CSV file format

liyaskerj avatar Feb 07 '24 10:02 liyaskerj

@azory-ydata @gliptak @akx @mattf Please let me know is it possible to implement this feature from your end. Thank You

liyaskerj avatar Mar 11 '24 10:03 liyaskerj