title: Lists as argument of pandas functions
body: <p>I'm new on python and pandas.<br>
  I've a data frame and I want to sort by multiple columns. I've created two lists, one with the columns list and one with sort orders. I want to use these lists into pandas sort_values function</p>
  <pre>from pandas import DataFrame
  import pandas as pd
  
  d = {'num_sum':[2,3,1,4,5],
       'num_avg':[5,4,3,2,1]}
  
  result = DataFrame(d)
  
  col_list = ['num_sum','num_avg']
  sort_order = [True, False]
  
  result = result.sort_values([col_list], ascending=[sort_order]) </pre>
  <p>but returns</p>
  <pre> KeyError: ['num_sum', 'num_avg'] </pre> 
  <p>How can I pass the two lists as argument of the sort_values function?</p>