Returns the median value of a series.

    Args:
        series (pandas.Series): column to summarize.

def median(series):
    """
    Returns the median value of a series.

    Args:
        series (pandas.Series): column to summarize.
    """

    if np.issubdtype(series.dtype, np.number):
        return series.median()
    else:
        return np.nan