title: Multiplying timedeltas and exponential calculations in pandas
body: <p>I am new to programming and would like to use pandas to calculate exponential decay on some data. However, I am having trouble running multiplication or exponential operations on a time delta values. I think that timedelta values might not be supported for these more complex operations, but surely there is a simple way to do this? </p>
  
  <p><strong>Input code:</strong> </p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.read_excel('exponential example.xlsx', sheet_name = 'Sheet1',
                    usecols = ("A:D"), parse_dates = True)
  
  
  df['time difference']= df['date 1']-df['date 2']
  print(df.head(3))
  
  
  df['output'] = df['value 1']*np.exp(df['time difference']*.01)
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>  sample     date 1     date 2  value 1 time difference
  
  0       1 2018-01-01 2019-01-01        2       -365 days
  1       2 2018-01-01 2019-01-01        4       -365 days
  Traceback (most recent call last):
    File "/Users/l225445/Desktop/python test/exponential example.py", line 15, in &lt;module&gt;
      df['output'] = df['value 1']*np.exp(df['time difference']*.01)
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/series.py", line 679, in __array_ufunc__
      result = getattr(ufunc, method)(*inputs, **kwargs)
  TypeError: ufunc 'exp' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
  </code></pre>