title: How can I fix the error AttributeError: 'Series' object has no attribute 'swifter'?
body: <p>This is pretty direct, I was trying to replicate the example used in Swifter page <a href="https://github.com/jmcarpenter2/swifter" rel="nofollow noreferrer">https://github.com/jmcarpenter2/swifter</a>. However, I keep getting the error AttributeError: 'Series' object has no attribute 'swifter'. What's up with that?</p>
  <p>Update - The example I tried:</p>
  <pre><code>import pandas as pd
  import swifter 
  
  df = pd.DataFrame({'x': [1, 2, 3, 4], 'y': [5, 6, 7, 8]})
  
  # runs on single core
  df['x2'] = df['x'].apply(lambda x: x**2)
  # runs on multiple cores
  df['x2'] = df['x'].swifter.apply(lambda x: x**2)
  
  # use swifter apply on whole dataframe
  df['agg'] = df.swifter.apply(lambda x: x.sum() - x.min())
  
  # use swifter apply on specific columns
  df['outCol'] = df[['inCol1', 'inCol2']].swifter.apply(my_func)
  df['outCol'] = df[['inCol1', 'inCol2', 'inCol3']].swifter.apply(my_func,
           positional_arg, keyword_arg=keyword_argval)
  </code></pre>