How to sum values grouped by two columns in pandas
pivot_table was made for this:

df.pivot_table(index='Date',columns='Groups',aggfunc=sum)


results in

         data
Groups    one  two
Date
2017-1-1  3.0  NaN
2017-1-2  3.0  4.0
2017-1-3  NaN  5.0


Personally I find this approach much easier to understand, and certainly more pythonic than a convoluted groupby operation.  Then if you want the format specified you can just tidy it up:

df.fillna(0,inplace=True)
df.columns = df.columns.droplevel()
df.columns.name = None
df.reset_index(inplace=True)


which gives you

       Date  one  two
0  2017-1-1  3.0  0.0
1  2017-1-2  3.0  4.0
2  2017-1-3  0.0  5.0