ratpmetro/main.py
def _agg_incident_cause(self, cause):
        """
        Given a list of causes found by self._classify_incident_cause,
        return the most common cause (useful when resampling)
        """
        cause = list(filter(("N/A").__ne__, cause))  # remove N/A
        if len(cause) > 0:
            return max(set(cause), key=cause.count)
        else:
            return "N/A"

        Given a list of causes found by self._classify_incident_cause,
        return the most common cause (useful when resampling)
        
Given a list of causes found by self._classify_incident_cause,
return the most common cause (useful when resampling)
Given a list of causes found by self . _classify_incident_cause return the most common cause ( useful when resampling )
def _agg_incident_cause(self, cause):
        cause = list(filter(("N/A").__ne__, cause))  
        if len(cause) > 0:
            return max(set(cause), key=cause.count)
        else:
            return "N/A"
def _agg_incident_cause ( self , cause ) : cause = list ( filter ( ( "N/A" ) . __ne__ , cause ) ) if len ( cause ) > 0 : return max ( set ( cause ) , key = cause . count ) else : return "N/A"
Given a list of causes found by self._classify_incident_cause,
return the most common cause (useful when resampling)
Given a list of causes found by self . _classify_incident_cause return the most common cause ( useful when resampling )
"""
        Given a list of causes found by self._classify_incident_cause,
        return the most common cause (useful when resampling)
        """ # remove N/A
self
cause