I am trying to plot data that has been binned by certain date ranges. 

Say for example I have the following dataframe:

```
dates = pd.date_range(start=pd.datetime(2013, 6, 1), periods=50, freq='D')
df = pd.DataFrame(np.random.normal(10, 3, 50), columns=['x'], index=dates)
df[:3]
            x
2013-06-01  9.819422
2013-06-02  3.659629
2013-06-03  14.862231

```

I would like to group the dates by 3 week intervals and plot the data, this gives me the average I am looking for, 

```
df.resample('3w', how='mean')

            x
2013-06-02  11.424715
2013-06-23  9.443888
2013-07-14  8.572851
2013-08-04  9.873879

```

But I would like to keep all of the data so that I can use boxplots in `seaborn` or include standard error using `matplotlib`. I'm completely stuck on how to achieve this without explicitly defining the ranges (which is not possible with the actual dataframes I am working with). It seems there must be a fairly straightforward way to do this in pandas so the output would be something like:

```
            x           week
2013-06-01  9.819422    1
2013-06-02  3.659629    1
2013-06-03  14.862231   1

```

Where `week` is a categorical variable representing the binned data. Any thoughts would be appreciated.