title: question on weekly aggregation using python
body: <p>Given a list of timestamps in sequential order, return a list of lists grouped by week (7 days) using the first timestamp as the starting point.</p>
  
  <p>for example:</p>
  
  <p>ts = ['2019-01-01','2019-01-02','2019-01-08', '2019-02-01','2019-02-05']</p>
  
  <p>output = [['2019-01-01', '2019-01-02'],['2019-01-08'],['2019-02-01', '2019-02-05']]</p>
  
  <pre><code>ts = pd.DataFrame(ts, columns = ['date'])
  ts['week'] = pd.to_datetime(ts.date).dt.week
  ts.groupby('week')['date'].apply(list).tolist()
  </code></pre>
  
  <p>is there a way of solving the above without using pandas?</p>