def _get_index_freq(data):
    freq = getattr(data.index, 'freq', None)
    if freq is None:
        freq = getattr(data.index, 'inferred_freq', None)
        if freq == 'B':
            weekdays = np.unique(data.index.dayofweek)
            if (5 in weekdays) or (weekdays in 6):
                freq = None
    return freq
dataset/ETHPy150Open pydata/pandas/pandas/tseries/plotting.py/_get_index_freq/swapped operands of `in`