Python Pandas: Add column based on other column
<p>I'm new to pandas and pretty confused about it especially compared to lists and using list comprehensions.</p>

<p>I have a dataframe with 4 columns. I want to create a 5th column "c" based on 4th column "m". I can get the value for "c" by applying my function for each row in column "m".</p>

<p>If "m" was a list and using list comprehension it would be</p>

<pre><code>c = [myfunction(x) for x in m]
</code></pre>

<p>How do I do apply this "logic" to a dataframe?</p>