title: How to get slope of each column for DataFrame with datetime index in Python?
body: <pre><code>import pandas as pd
  #from statsmodels.tsa.api import SimpleExpSmoothing
  
  df = pd.DataFrame({&quot;A&quot;:[100,150,200,250],&quot;B&quot;:[100,200,300,400]}, index=pd.to_datetime(['2000-12-31', '2001-12-31', '2002-12-31', '2003-12-31']))
  </code></pre>
  <blockquote>
  <pre><code>              A   B
  2000-12-31    100 100
  2001-12-31    150 200
  2002-12-31    200 300
  2003-12-31    250 400
  </code></pre>
  </blockquote>
  <p>I want to get a series which contains slopes for each columns.</p>