title: Pandas: map function along each row of columns defined at runtime (using *args)
body: <p>I want to apply a function on the row data of a Pandas DataFrame using *args.
  This can be done like this (toy example to retrieve maximum of row):</p>
  
  <pre><code>df = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))
  def f(*args):
     cols = [c for c in args]
     return max(cols)
  
  m = list(map(f,df['A'],df['B'],df['C'],df['D']))
  </code></pre>
  
  <p>Is there a way to do it in this manner without having to list all the columns separately? For example, when a dataframe has arbitrary columns, defined at runtime.</p>
  
  <p>Finding the maximum could also be done in easier ways but how can one apply arbitrary functions to rows (if *args is not possible)</p>