def feat(row):
    """Adds a new binary feature that it is 1 if it a working time, 0 otherwise. Spanish working hours
    were used, i.e. working day is from 9 to 13 and from 16 to 20"""

    if row['weekday_Saturday'] != 1 and row['weekday_Sunday'] != 1:
        if 9. <= row['hour'] <= 13. or 16. <= row['hour'] <= 20.:
            return 1
    return 0