title: Python Panda TIme series re sampling
body: <p>I am writing scripts in panda but i could not able to extract correct output that i want. here it is problem: </p>
  
  <p>i can read this data from CSV file. Here you can find table structure </p>
  
  <p><a href="http://postimg.org/image/ie0od7ejr/" rel="nofollow">http://postimg.org/image/ie0od7ejr/</a> </p>
  
  <p>I want this output from above table data</p>
  
  <pre><code>Month     Demo1 Demo 2
  June 2013 3     1    
  July 2013 2     2
  </code></pre>
  
  <p>in Demo1 and Demo2 column i want to count regular entry and entry which starts with u. for June there are total 3 regular entry while 1 entry starts with u.</p>
  
  <p>so far i have written this code. </p>
  
  <pre><code>   import sqlite3
     from pylab import *       
     import numpy as np
     import matplotlib.pyplot as plt
     import matplotlib.dates as mdates
     import datetime as dt
  
     conn = sqlite3.connect('Demo2.sqlite')
     df = pd.read_sql("SELECT * FROM Data", conn)
     df['DateTime'] = df['DATE'].apply(lambda x: dt.date.fromtimestamp(x))
  
     df1 = df.set_index('DateTime', drop=False)
  </code></pre>
  
  <p>Thanks advace for help. End result would be bar graph. I can draw graph from output that i mention above. </p>