pandas: function equivalent to SQL's datediff()?
<p>Is there an equivalent to SQL's datediff function in Python's pandas?
The answer to this question:
<a href="https://stackoverflow.com/questions/22132525/add-column-with-number-of-days-between-dates-in-dataframe-pandas">Add column with number of days between dates in DataFrame pandas</a>
explains how to calculate the difference in days. For example:</p>

<pre><code>&gt;&gt;&gt; (pd.to_datetime('15-10-2010') - pd.to_datetime('15-07-2010')) / pd.offsets.Day(1)
92.0
</code></pre>

<p>However, I have two questions:</p>

<ol>
<li>Is  there a way to calculate the difference in months? I can approximate dividing the result above by 30, by 31, but I was wondering if there is some built-in function that does this automatically.</li>
<li>what is the syntax of pd.offsets? I tried dividing by pd.offsets.Month(1) and it doesn't work. I looked up the documentation here (which is atrocious, like all of Python's documentation!): <a href="http://pandas.pydata.org/pandas-docs/stable/timeseries.html#dateoffset-objects" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/stable/timeseries.html#dateoffset-objects</a> but Day() is not there, so I'm confused</li>
</ol>