title: Dynamic column assignment in Python Pandas
body: <p>I have a pandas dataframe from which I'd like to create some text-related feature columns. I also have a class that calculates those features. Here's my code:</p>
  <pre><code>r = ReadabilityMetrics()
  text_features = [['sentence_count', r.sentence_count], ['word_count', r.word_count], ['syllable_count', r.syllable_count], ['unique_words', r.unique_words],
                 ['reading_time', r.reading_time], ['speaking_time', r.speaking_time], ['flesch_reading_ease', r.flesch_reading_ease], ['flesch_kincaid_grade', r.flesch_kincaid_grade], 
                   ['char_count', r.char_count]]
  
  (df
   .assign(**{t:df['description'].apply(f) for t, f in text_features})
  )
  </code></pre>
  <p>I iterate over <code>text_features</code> to dynamically create the columns.</p>
  <p>My question: <strong>how can I remove reference to the methods and make <code>text_features</code> more concise?</strong></p>
  <p>For example, I'd like have <code>text_features = ['sentence_count', 'word_count', 'syllable_count', ...]</code>, and since the column names are the same as the function names, dynamically reference the functions. Having a nested list doesn't seem DRY so looking for a more efficient implementation.</p>