I have a question regarding resampling of DataFrames.
import pandas as pd
df = pd.DataFrame([['2005-01-20', 10], ['2005-01-21', 20], 
                   ['2005-01-27', 40], ['2005-01-28', 50]],
                   columns=['date', 'num'])
# Convert the column to datetime 
df['date'] = pd.to_datetime(df['date'])
# Resample and aggregate results by week
df = df.resample('W', on='date')['num'].sum().reset_index()
print(df.head())
# OUTPUT: 
#         date  num
# 0 2005-01-23   30
# 1 2005-01-30   90 
Everything works as expected, but I would like to better understand what exactly resample(),['num'] and sum() do here. 
QUESTION #1
Why the following happens:
The result of df.resample('W', on='date') is DatetimeIndexResampler.
The result of df.resample('W', on='date')['num']  is pandas.core.groupby.SeriesGroupBy.
The result of df.resample('W', on='date')['num'].sum() is
date
2005-01-23    30
2005-01-30    90
Freq: W-SUN, Name: num, dtype: int64
QUESTION #2
Is there a way to produce the same results without resampling? For example, using groupby.
 
     
    