title: Manipulate lists in a pandas data frame column (e.g. divide by another column)
body: <p>I have a pandas data frame with one column containing lists. I wish to divide each list element in each row by a scalar value in another column. In the following example, I wish to divide each element in a by b:</p>
  
  <pre><code>              a   b
  0  [11, 22, 33]  11
  1  [12, 24, 36]   2
  2  [33, 66, 99]   3
  </code></pre>
  
  <p>Thus yielding the following result:</p>
  
  <pre><code>              a   b                   c
  0  [11, 22, 33]  11     [1.0, 2.0, 3.0]
  1  [12, 24, 36]   2   [6.0, 12.0, 18.0]
  2  [33, 66, 99]   3  [11.0, 22.0, 33.0]
  </code></pre>
  
  <p><strong>I can achieve this</strong> by the following code:</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({"a":[[11,22,33],[12,24,36],[33,66,99]], "b" : [11,2,3]})
  
  result = {"c":[]}
  for _, row in df.iterrows():
      result["c"].append([x / row["b"] for x in row["a"]])
  
  df_c = pd.DataFrame(result)
  df = pd.concat([df,df_c], axis="columns")
  </code></pre>
  
  <p>But explicit iteration over rows and collecting the result in a dictionary, converting it to a dataframe and then concatenation to the original data frame seems <strong>very inefficient and inelegant</strong>.</p>
  
  <p><strong>Does anyone have a better solution?</strong></p>
  
  <p>Thanks in advance and cheeers!</p>
  
  <hr>
  
  <p><em>PS</em>: In case you are wondering why I would store lists in a column: These are the resulting amplitudes of a Fourier-Transformation. </p>
  
  <p>Why I don't use one column for each frequency? </p>
  
  <ol>
  <li>Creating a new column for each frequency is horribly slow</li>
  <li>With different sampling rates and FFT-window sizes in my project, there are multiple sets of frequencies.</li>
  </ol>