title: Python Pandas: differences between two dates in weeks?
body: <p>When trying to find differences between two dates in weeks:</p>
  
  <pre><code>import pandas as pd
  
  def diff(start, end):
      x = millis(end) - millis(start)
      return x / (1000 * 60 * 60 * 24 * 7 * 1000)
  
  def millis(s):
      return pd.to_datetime(s).to_datetime64()
  
  diff("2013-06-10","2013-06-16")
  </code></pre>
  
  <p>As a result I get:</p>
  
  <pre><code>Out[15]: numpy.timedelta64(857,'ns')
  </code></pre>
  
  <p>Which is obviously wrong. Questions:</p>
  
  <ol>
  <li><p>How to get the difference in weeks, not nanoseconds, rounded up to a whole value?</p></li>
  <li><p>How to get value out of 'numpy.timedelta64' object?</p></li>
  </ol>