title: How to calculate average time for several runs in Python
body: <p>I have a SQLite database with the time for different runs. The time is stored as text and has the following format: MM:SS.fff for example 04:20.458 for 4 minutes, 20 seconds and 458 milliseconds.</p>
  <p>What I would like to achieve is to get the average time of all runs. What I have done so far is to run a SQL query and write the result into a pandas dataframe. Data looks like this:</p>
  <pre><code>          time
  0    04:58.244
  1    05:01.509
  2    04:56.664
  3    04:48.271
  4    04:48.853
  ..         ...
  </code></pre>
  <p>As a next step I have converted the text values into a datetime format like this:</p>
  <pre><code>df['time'] = pd.to_datetime(df['time'], format='%M:%S.%f')
  </code></pre>
  <p>Output is now as following:</p>
  <pre><code>                       time
  0   1900-01-01 00:04:58.244
  1   1900-01-01 00:05:01.509
  2   1900-01-01 00:04:56.664
  3   1900-01-01 00:04:48.271
  4   1900-01-01 00:04:48.853
  ..                      ...
  </code></pre>
  <p>And here I am stuck. Using mean() returns nothing. All I found are instructions on how to calculate the difference between times, but as written before, I am interested in an overall average of the times. Unfortunately, I found nothing that helped me to make it work.</p>
  <p>Some tips or help would be very appreciated.</p>