def z_score(data2d, axis=0):
    """Standardize the mean and variance of the data axis Parameters.

    :param data2d: DataFrame to normalize.
    :param axis: int, Which axis to normalize across. If 0, normalize across rows,
                  if 1, normalize across columns.


    :Returns: Normalized DataFrame. Normalized data with a mean of 0 and variance of 1
              across the specified axis.

    """
    if axis == 1:
        z_scored = data2d
    else:
        z_scored = data2d.T
    z_scored = (z_scored - z_scored.mean()) / z_scored.std()
    if axis == 1:
        return z_scored
    else:
        return z_scored.T
