title: pandas groupBy date then filter date and string into new dataframe
body: <p>I'm struggling here, I'm looking to take the following data, group by date, then check the rows within the group to determine whether or not the group has any location data associated with it, if yes, extract it.</p>
  
  <p>My data sample:</p>
  
  <pre><code>id,dates,text,place
  1,2017-01-26 01:06:47,text,"Place(country_code='US', full_name='Manhattan, NY', place_type='city', name='Manhattan', contained_within=[], _api=&lt;tweepy.api.API object at 0x10336f320&gt;, attributes={}, country='United States', bounding_box=BoundingBox(type='Polygon', coordinates=[[[-74, 40], [-73, 40], [-73, 40], [-74, 40]]], _api=&lt;tweepy.api.API object at 0x10336f320&gt;))"
  2,2017-01-26 01:05:51,text,"Place(country_code='US', full_name='Manhattan, NY', place_type='city', name='Manhattan', contained_within=[], _api=&lt;tweepy.api.API object at 0x10336f320&gt;, attributes={}, country='United States', bounding_box=BoundingBox(type='Polygon', coordinates=[[[-74, 40], [-73, 40], [-73, 40], [-74, 40]]], _api=&lt;tweepy.api.API object at 0x10336f320&gt;))"
  4,2017-01-23 01:38:29,text,
  5,2017-01-23 01:36:53,text,
  </code></pre>
  
  <p>I begin by loading the csv and grouping the dates</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import datetime
  
  fig = plt.figure(figsize=(5,5))
  df1 = pd.read_csv('data.csv')
  df = df1[['dates','place']]
  df['dates']=pd.to_datetime(df['dates'],format='%Y-%m-%d')
  df.index=df['dates']
  
  grp = pd.groupby(df,by=[df.index.year,df.index.month,df.index.day])
  for date,group in grp:
      print(date)
      print(group)
  </code></pre>
  
  <p>This will yield a dataframe that looks like this:</p>
  
  <pre><code>(2017, 1, 26)
                                    dates  \
  dates
  2017-01-26 01:06:47 2017-01-26 01:06:47
  2017-01-26 01:05:51 2017-01-26 01:05:51
  
                                                                   place
  dates
  2017-01-26 01:06:47  Place(country_code='US', full_name='Manhattan,...
  2017-01-26 01:05:51                                                NaN
  </code></pre>
  
  <p>Here is where I run into problems with filtering/conditionals, my goal is to have a dataframe that I can save to a csv that looks like this:</p>
  
  <pre><code>date, item_count, has_location, location
  2017-01-26, 2, yes, Manhattan
  2017-01-23, 2, no, na
  </code></pre>
  
  <p>What is the best way to proceed? Thanks</p>