title: Adding a trend line to a matplotlib line plot python
body: <p>Apologies if this has already been asked but I can't find the answer anywhere. I want to add an overall trend line to a plt plot. Sample data:</p>
  
  <pre><code>import pandas as pd
  data = pd.DataFrame({'year': [2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 
                                2019],
                       'value': [2, 5, 8, 4, 1, 6, 10, 14, 8]})
  
  import matplotlib.pyplot as plt
  plt.rcParams['figure.figsize'] = [28, 26]
  data.plot(x = "year", y = "value", fontsize = 30)
  plt.xlabel('Time', fontsize = 30)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/2B98z.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2B98z.png" alt="enter image description here"></a></p>
  
  <p>How can I add a trend line?</p>