title: Adding a trendline to time series plot
body: <p>I have this plot</p>
  <p><a href="https://i.stack.imgur.com/2Nl4a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Nl4a.png" alt="enter image description here" /></a></p>
  <p>Now I want to add a trend line to it, how do I do that?</p>
  <p>The data looks like this:</p>
  <p><a href="https://i.stack.imgur.com/f092p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f092p.png" alt="enter image description here" /></a></p>
  <p>I wanted to just plot how the median listing price in California has gone up over the years so I did this:</p>
  <pre><code># Get California data
  state_ca = []
  state_median_price = []
  state_ca_month = []
  for state, price, date in zip(data['ZipName'], data['Median Listing Price'], data['Month']):
      if &quot;, CA&quot; not in state:
          continue
      else:
          state_ca.append(state)
          state_median_price.append(price)
          state_ca_month.append(date)
  </code></pre>
  <p>Then I converted the string state_ca_month to datetime:</p>
  <pre><code># Convert state_ca_month to datetime
  state_ca_month = [datetime.strptime(x, '%m/%d/%Y %H:%M') for x in state_ca_month]
  </code></pre>
  <p>Then plotted it</p>
  <pre><code># Plot trends
  figure(num=None, figsize=(12, 6), dpi=80, facecolor='w', edgecolor='k')
  plt.plot(state_ca_month, state_median_price)
  plt.show()
  </code></pre>
  <p>I thought of adding a trendline or some type of line but I am new to visualization. If anyone has any other suggestions I would appreciate it.</p>
  <p>Following the advice in the comments I get this scatter plot</p>
  <p><a href="https://i.stack.imgur.com/ojifV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ojifV.png" alt="enter image description here" /></a></p>
  <p>I am wondering if I should further format the data to make a clearer plot to examine.</p>