title: Plotly - Values of dict object not JSON serializable for timestamp?
body: <p>I'm trying to use plotly to create a scatter plot, but it seems like my timestamp is not JSON serializable? This is the error I'm getting: </p>
  
  <pre><code>TypeError &lt;built-in method values of dict object at 0x7f6f3d8ac910&gt; is not JSON serializable 
  </code></pre>
  
  <p>And this is the code I currently have: </p>
  
  <pre><code>df = datasets[3]
  
  #New column with hour rounded
  df['hour'] = df['p_time'].dt.floor('h')
  
  hour_counts = {}
  for hour in df['hour']:
      if hour in hour_counts:
          hour_counts[hour] = hour_counts[hour] + 1
      else:
          hour_counts[hour] = 1 
  
  print hour_counts
  
  count = Scatter(
      x= hour_counts.keys,
      y= hour_counts.values,
      name = "Number of Riders",
      line = dict(color = '#17BECF'),
      opacity = 0.8)
  
  data = [count]
  
  layout = dict(
      title='Time Series with Rangeslider',
      xaxis=dict(
          rangeselector=dict(
              buttons=list([
                  dict(count=1,
                       label='1d',
                       step='day',
                       stepmode='backward'),
                  dict(count=6,
                       label='6d',
                       step='day',
                       stepmode='backward'),
                  dict(step='all')
              ])
          ),
          rangeslider=dict(),
          type='date'
      )
  )
  
  fig = dict(data=data, layout=layout)
  iplot(fig)
  </code></pre>
  
  <p>Can anyone provide some insight? Apologies if this is a stupid question. I'm very new to python. Thank you!</p>