merge_machine/missing_values.py
def mv_from_punctuation(top_values, score=1):
    """Check if value is only one with only punctuation"""    
    punct = string.punctuation + ' '
    is_punct = pd.Series([all(y in punct for y in x) for x in top_values.index], index=top_values.index)
    if (is_punct).sum() == 1:
        mv_value = is_punct[is_punct].index[0]
        return [(mv_value, score, 'punctuation')]
    return []
Check if value is only one with only punctuation
Check if value is only one with only punctuation
Check if value is only one with only punctuation
def mv_from_punctuation(top_values, score=1):
    punct = string.punctuation + ' '
    is_punct = pd.Series([all(y in punct for y in x) for x in top_values.index], index=top_values.index)
    if (is_punct).sum() == 1:
        mv_value = is_punct[is_punct].index[0]
        return [(mv_value, score, 'punctuation')]
    return []
def mv_from_punctuation ( top_values , score = 1 ) : punct = string . punctuation + ' ' is_punct = pd . Series ( [ all ( y in punct for y in x ) for x in top_values . index ] , index = top_values . index ) if ( is_punct ) . sum ( ) == 1 : mv_value = is_punct [ is_punct ] . index [ 0 ] return [ ( mv_value , score , 'punctuation' ) ] return [ ]
Check if value is only one with only punctuation
Check if value is only one with only punctuation
"""Check if value is only one with only punctuation"""
top_values
score