title: How to calculate number of days between 2 months in Python
body: <p>I have a requirement where I have to find number of days between 2 months where 1st month value is constant and 2nd month value is present in a data frame.</p>
  <p>I have to subtract 24th Feb with values present in the Data Frame.</p>
  <pre><code>past_2_month = date.today()
  def to_integer(dt_time):
      return 1*dt_time.month
  past_2_month = to_integer(past_2_month)
  past_2_month_num = past_2_month-2
  day = 24
  date_2 = dt.date(year, past_2_month_num, day)
  date_2
  </code></pre>
  <p>Output of above code: datetime.date(2022, 2, 24)</p>
  <p>Other values present in the Data frame is below:</p>
  <pre><code>dict_1 = {'Col1' : ['2017-05-01', np.NaN, '2017-11-01', np.NaN, '2016-10-01']}
  a = pd.DataFrame(dict_1)
  </code></pre>
  <p>How to subtract this 2 values so that I can get difference in days between these 2 values?</p>