DEV Community

Kartikeya Sharma
Kartikeya Sharma

Posted on

Answer: Pandas: shorten notation for simple operations on multiple columns

You can easily do it like this

df[['A','B','C']] = df[['A','B','C']]/2

Sometime pandas just surprise you!

Top comments (0)