/Python/Df = df.apply(lambda x: np.square(x) if x.name in [ 'a', 'e', 'g'] else x, axis=1)

Df = df.apply(lambda x: np.square(x) if x.name in [ 'a', 'e', 'g'] else x, axis=1)

Df = df.apply(lambda x: np.square(x) if x.name in [ 'a', 'e', 'g'] else x, axis=1)

0
ShareSimilar codes
Share