title: Im getting TypeError: '<=' not supported between instances of 'str' and 'Timestamp'
body: <p>I'm totally new to python and panda framework.
  Im trying to process large file set (excel) and group by using few column names.
  Each file contains following columns;</p>
  
  <pre><code>Site Dip Time                  TankId  Product
  ABC  10/09/2019 18:07:33 p.m.   1      diesel
  </code></pre>
  
  <p>.....</p>
  
  <p>After implying datecolumn, when I list datatypes;
  i get <strong>Dip Time as object</strong>. why?;</p>
  
  <p>Site            object
  Tank ID          int64
  Product         object
  Dip Time        object
  dtype: object</p>
  
  <p>Also i get following error; 
  Why the date column is interpreted as string here? What should I do to overcome this?</p>
  
  <pre><code>TypeError: '&lt;=' not supported between instances of 'str' and 'Timestamp'
  
  import pandas as pd
      def read_dipsfile(writer):
          atg_path = '/Users/ratha/PycharmProjects/data/dips'
          files = os.listdir(atg_path)
          df = pd.DataFrame()
          dateCols = ['Dip Time']
          for f in files:
              data = pd.read_excel(os.path.join(atg_path, f), sheet_name='Tank Export', skiprows=[0], parse_dates=dateCols,
                                       infer_datetime_format =True)
              df = df.append(data)
          print(df.dtypes)
  
          x = df.groupby(['Site', 'Tank ID', 'Product'], as_index=False).apply(atg_aggregation)
          x.to_excel(writer, sheet_name='DipsSummary')
  
  
  def atg_aggregation(data):
      count = data['Dip Time'].count()
      minVal = data['Dip Time'].min()
      maxVal = data['Dip Time'].max()
      tankcount = data['Tank ID'].count()
      productcount = data['Product'].count()
  
      agg = {
          'totalRecords': count,
          'firstSeen': minVal,
          'lastSeen': maxVal,
          'tankCount': tankcount,
          'productCount': productcount
      }
      return pd.Series(agg, index=['totalRecords', 'firstSeen', 'lastSeen', 'tankCount', 'productCount'])
  </code></pre>