pandas mode is "empty if nothing has 2+ occurrences."
    this method always returns something:
        nan if the series is empty/nan), breaking ties arbitrarily

def mode(series):
    """
    pandas mode is "empty if nothing has 2+ occurrences."
    this method always returns something:
        nan if the series is empty/nan), breaking ties arbitrarily
    """
    if series.notnull().sum() == 0:
        return np.nan
    else:
        return series.value_counts().idxmax()