def drop_nans(subset):
    """Drop rows of a DataFrame with NaN values in a given column and
    reset the index."""

    def dropper(data):
        return data.dropna(subset=subset).reset_index(drop=True)

    return dropper