Usage Question: How to add/reindex leading and trailing dates
#### Code Sample, a copy-pastable example if possible

```

df = pd.DataFrame.from_records(data=data, coerce_float=False, index=['date'])
# date field a datetime.datetime values

            account_id  amount
date                          
2018-01-01           1   100.0
2018-01-01           1    50.0
2018-06-01           1   200.0
2018-07-01           2   100.0
2018-10-01           2   200.0

```
#### Problem description

How can I "pad" my dataframe with leading and trailing "empty dates". I have tried to reindex on a date_range and period_range, I have tried to merge another index. I have tried all sorts of things all day, and I have read alot of the docs.

I have a simple dataframe with columns `transaction_date`, `transaction_amount`, and `transaction_account`. I want to group this dataframe so that it is grouped by account at the first level, and then by year, and then by month. Then I want a column for each month, with the `sum` of that month's transaction amount value.

This seems like it should be something that is easy to do.

#### Expected Output

This is the closest I have gotten:

```

df = pd.DataFrame.from_records(data=data, coerce_float=False, index=['date'])
df = df.groupby(['account_id', df.index.year, df.index.month])
df = df.resample('M').sum().fillna(0)

print(df)
                                                          account_id  amount
account_id date   date       date                          
1                 2018       1       2018-01-31           2   150.0
                             6       2018-06-30           1   200.0
2                 2018       7       2018-07-31           2   100.0
                            10       2018-10-31           2   200.0

```

**And this is what I want to achieve (basically reindex the data by `date_range(start='2018-01-01', period=12, freq='M')`**

*(Ideally I would want the month to be transposed by year across the top as columns)*

```
                                            amount
account_id        Year        Month
1                 2018           1        150.0
                                 2         NaN
                                 3         NaN
                                 4         NaN
                                 5         NaN
                                 6        200.0
                                 ....
                                 12      200.0
2                 2018           1          NaN
                                 ....
                                 7        100.0
                                 ....
                                 10        200.0
                                 ....
                                 12        NaN
```

If you want some stack overflow credit -> https://stackoverflow.com/questions/55308342/leading-and-trailing-padding-dates-in-pandas-dataframe