title: How to group daily data weekly starting from date of first row then group data counts as columns in Python?
body: <p>I have several rows of daily data per day like this:</p>
  <pre><code>Date       | Operation  | Condition | Type      |Location
  2019/01/01 | Sale       | Used      |Commercial |32
  2019/01/01 | Rent       | Used      |Housing    |2
  2019/01/01 | Sale       | New       |Housing    |20
  2019/01/01 | Sale       | New       |Housing    |15
  2019/01/01 | Rent       | New       |Commercial |1
  </code></pre>
  <p>that I need to convert to weekly getting the counts from 3 columns, each column has only 2 possible values so I'd like to have 8 columns representing all possible 8 combinations of values for each and all of the different locations for each location:</p>
  <pre><code>Week                  |Commercial-Rent-New|Comercial-Sale-New|Comercial-Rent-Used|Commercial-Sale-Used...+ 4 Housing cols
  2019/06/01-2019/06/07 |328                |1284              |2003               |4916 
  2019/06/08-2019/06/15 |214                |2015              |2551               |5025 
  2019/06/16-2019/06/23 |400                |1379              |1795               |3580 
  ...
  2022/01/01-2019/01/07 |288                |1977              |1643               |5211 
  </code></pre>
  <p>So far reading from articles and other posts from this site, I have grouped my DataFrame using this answer from a [post][1]</p>
  <pre><code>#convert date column to datetimes
   df['date'] = pd.to_datetime(df['date'])
  
   df1 = df.resample('W', on='date')['count1','count2'].sum()
  </code></pre>
  <p>I don't know it this approach is what I need because it's only outputing the start of the week and I can't figure how to count the rows for each combination of values into the 8 columns I mentioned earlier. I read that I could also use groupby function but as I am still very new to Python I'm kinda lost. I'd appreciate any help! Thanks in advance.
  [1]: <a href="https://stackoverflow.com/questions/59246839/pandas-group-by-date-weekly">Pandas Group by date weekly</a></p>