title: Create eventplot from pandas long format
body: <p>I am having issue to get a pandas dataframe with several observations into the correct format to display an eventplot. The <code>'creator'</code> column should be the label used to distinguish the datasets.</p>
  <pre><code>import pandas as pd
  from matplotlib import pyplot as plt
  
  data = {
      &quot;creator&quot;: [1, 2, 1, 1, 2],
      &quot;creationdate&quot;: [&quot;2019-03-13 16:43:55&quot;, &quot;2019-03-13 16:43:55&quot;, &quot;2019-03-15 15:52:05&quot;,
                     &quot;2019-03-16 15:52:05&quot;, &quot;2019-03-17 15:52:05&quot;]
  }
  
  df = pd.DataFrame(data)
  df[&quot;creationdate&quot;] = pd.to_datetime(df[&quot;creationdate&quot;])
  
  # df
  #   creator        creationdate
  #0        1 2019-03-13 16:43:55
  #1        2 2019-03-13 16:43:55
  #2        1 2019-03-15 15:52:05
  #3        1 2019-03-16 15:52:05
  #4        2 2019-03-17 15:52:05
  
  # Group by creator
  grouped = df.groupby(&quot;creator&quot;)
  
  # How can the data now be reshaped to actually display the plot
  # ...
  
  # TypeError: Invalid comparison between dtype=datetime64[ns] and int
  fig = plt.eventplot(grouped)
  plt.show()
  </code></pre>
  <p>I tried to iterate over the grouped array to extract the individual groups but this seems way to complex and unnecessary.</p>
  <pre><code>data = np.array([grouped.get_group(1)[&quot;creationdate&quot;].to_numpy(), grouped.get_group(2)[&quot;creationdate&quot;].to_numpy()])
  </code></pre>