SyntaxFix
Write A Post
Hire A Developer
Questions
Let's say we want to apply a function add5 to columns 'a' and 'b' of DataFrame df
def add5(x): return x+5 df[['a', 'b']].apply(add5)