Using python, I need to average value based on two keys in two columns from a CSV file
<p>I have a csv file with 3 columns</p>

<pre><code>TMC, EPOCH, Time
11C12, 1, 24
11C12, 1, 34
11C12, 2, 56
11C12, 2, 78
11C13, 1, 56
11C13, 2, 45
11C13, 2, 64
11C13, 3, 32
11C13, 3, 28
</code></pre>

<p>Now I want to have average.py file which calculates average of time for each combination of TMC, EPOCH and write that to a txt or csv file</p>

<p>The desired output is:</p>

<pre><code>TMC, EPOCH, Average Time
11C12, 1, average value 
11C12, 2, average value
11C13, 1, average value
11C13, 2, average value
11C13, 3, average value
</code></pre>