These lines/columns will be deleted in transform(). Returning np.nan is consistent with the behaviour of np.mean and np.median that also return np.nan when the value can not be computed