title: Apply Zip function on Pandas Dataframe using a For Loop Argument
body: <p>I have a function called handle text that renames values in dataframe columns:</p>
  
  <pre><code>def handle_text(txt):
  if txt.lower()[:6] == 'deu_ga': 
      return 'Western Europe', 'Germany'
  elif txt.lower()[:6] == 'fra_ga':
      return 'Western Europe', 'France'
  return 'Other', 'Other'
  </code></pre>
  
  <p>I apply handle_text on various dataframes in the following way:</p>
  
  <pre><code>campaigns_df['Region'], campaigns_df['Market']  = zip(*campaigns_df['Campaign Name'].apply(handle_text))
  
  atlas_df['Region'], atlas_df['Market']  = zip(*atlas_df['Campaign Name'].apply(handle_text))
  
  flashtalking_df['Region'], flashtalking_df['Market']  = zip(*flashtalking_df['Campaign Name'].apply(handle_text))
  </code></pre>
  
  <p>I was wondering if there was a way to do a for loop to apply the function to various dfs at once:</p>
  
  <pre><code>dataframes = [atlas_df, flashtalking_df, innovid_df, ias_viewability_df, ias_fraud_df]
  columns_df = ['Campaign Name']
  
  for df in dataframes:
      for column in df.columns:
          if column in columns_df:
              zip(df.column.apply(handle_text))
  </code></pre>
  
  <p>However the error I get is:</p>
  
  <pre><code>AttributeError: 'DataFrame' object has no attribute 'column'
  </code></pre>