Multiply rows in pandas dataframe
<p>I have a dataframe with, say, 4 rows labeled r1 through r4 and 2 columns ("c1" and "c2"). The values in this dataframe/matrix are "a<em>ij</em>" as in (pseudo-code):</p>

<pre><code>dataframe =    c1  c2
            r1 a11 a12
            r2 a21 a22
            r3 a31 a32
            r4 a41 a42
</code></pre>

<p>I would now like to compute, in a very efficient way (think many many columns), the product of the rows.</p>

<p>More specifically,  I would like to form a list with number of elements equal to number of columns which, as its <em>i</em>th element has the product of all rows:</p>

<pre><code>list_ = [a11 * a21 * a31 * a41, a12 * a22 * a32 * a42]
</code></pre>

<p>In reality I have thousands of columns, but only around 4 rows.</p>

<p>I looked at dataframe's "sum(...)" function (with its "axis" argument) and it is something like that I need, but in a multiplication version. Not sure how to do this.</p>