def zscore(data2d, axis=<NUM_LIT:0>):
if axis is None:<EOL><INDENT>return data2d<EOL><DEDENT>assert axis in [<NUM_LIT:0>,<NUM_LIT:1>]<EOL>z_scored = data2d.apply(lambda x: (x-x.mean())/x.std(ddof=<NUM_LIT:1>), <EOL>axis=operator.xor(<NUM_LIT:1>, axis))<EOL>return z_scored<EOL>
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. If None, don't change data

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