data/feature_extraction.py
def compute_nonzero_sum(lst: str) -> float:
        """Computes the sum of nonzero elements in the list.

        Args:
            lst: A str of list representation.

        Returns: A integer indicating the sum of nonzero elements in the list.
        """
        if pd.isna(lst):
            return 0.0
        lst = eval(lst)
        total = 0
        for e in lst:
            if e != 0:
                total += e
        return total
Computes the sum of nonzero elements in the list.

        Args:
            lst: A str of list representation.

        Returns: A integer indicating the sum of nonzero elements in the list.
        
Computes the sum of nonzero elements in the list.
Computes the sum of nonzero elements in the list .
def compute_nonzero_sum(lst: str) -> float:
        if pd.isna(lst):
            return 0.0
        lst = eval(lst)
        total = 0
        for e in lst:
            if e != 0:
                total += e
        return total
def compute_nonzero_sum ( lst : str ) -> float : if pd . isna ( lst ) : return 0.0 lst = eval ( lst ) total = 0 for e in lst : if e != 0 : total += e return total
Computes the sum of nonzero elements in the list.
Computes the sum of nonzero elements in the list .
"""Computes the sum of nonzero elements in the list.

        Args:
            lst: A str of list representation.

        Returns: A integer indicating the sum of nonzero elements in the list.
        """
lst
str
A str of list representation.
A str of list representation .