title: How to create multiple Pandas time series from a data frame using python?
body: <p>I am starting with a Pandas data frame that looks like this:</p>
  <pre><code>   Type Date Number
  1   A    x     y
  2   B    x     y
  3   A    x     y
  4   B    x     y
  5   A    x     y
  </code></pre>
  <p>I want to create separate time series for Type A data and Type B data separately. What is the most efficient way of doing this?</p>
  <p>I am considering creating two different data frames from this where each data from only has data from one type and then converting each of the separate data frames to a series. However I don't know how to do this either.</p>
  <p>Extended question: Is there a way to do this if you don't even know how many different types there are?</p>
  <p>So far I tried checking to see if the type is of the type I want by using <code>df[&quot;type&quot;] == A</code>, and this doesn't give me a full data frame back just a data frame saying if the type was true or false.</p>
  <p>Additional information:</p>
  <p>My goal is to create separate pandas time series using the date and number data for type <code>A</code> and type <code>B</code> separately.</p>
  <p>I tried the following:</p>
  <pre class="lang-py prettyprint-override"><code>df.groupBy(&quot;Type&quot;).apply(lambda x: x.Date)
  </code></pre>
  <p>The above function works but only returns one column.</p>
  <pre class="lang-py prettyprint-override"><code>df.groupBy(&quot;Type&quot;).apply(lambda x: (x.Date, x.Number))
  </code></pre>
  <p>The above function doesn't work and returns something that is not what I want at all.</p>
  <p>Expected Output:</p>
  <pre><code>Type    Date Number
   A   1   x     y
       3   x     y
       5   x     y
   B   2   x     y
       4   x     y
  </code></pre>