title: update dictionary base on time delta of value
body: <p>I am trying to update a dictionary based on the time delta generated from its value. </p>
  
  <p>This is an example of the dictionary:</p>
  
  <pre><code>my_dict = {'6.1.7.1': {'timestamp':('2020-05-26 12:05:08')},
  '1.1.1.2': {'timestamp': ('2020-05-26 12:05:08')},
  '2.61.5.4': {'timestamp': ('2020-05-25 12:05:08')},}
  </code></pre>
  
  <p>I want to find out if the key value has a timestamp value that exceeds 24hr to delete it, so I have done this:</p>
  
  <pre><code>from datetime import date
  from datetime import datetime
  import pandas as pd
  
  today = date.today()
  today=today.strftime(format= '%Y-%m-%d %H:%M:%S')
  today=pd.to_datetime(today)
  print( today)
  
  for k,v in my_dict.items():
      timedelta = v - today
      if timedelta&gt;24:
          my_dict.pop(k, None) 
  </code></pre>
  
  <p>but I get the following error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-49-037388a76b67&gt; in &lt;module&gt;
        8 
        9 for k,v in my_dict.items():
  ---&gt; 10     timedelta = v - today
       11     if timedelta&gt;24:
       12         my_dict.pop(k, None)
  
  pandas/_libs/tslibs/timestamps.pyx in pandas._libs.tslibs.timestamps._Timestamp.__sub__()
  TypeError: descriptor '__sub__' requires a 'datetime.datetime' object but received a 'dict'
  </code></pre>
  
  <p>How can I manipulate the value of the dictionary to do get the timedelta and after eliminate the key and value in the dictionary? Any help will be appreciated since I am not very familiar with dictionaries. </p>