How can you 'copy' previous rows from a Pandas dataframe where it is indexed by a date, if the row does not exist on the next date. This is motivated by the problem below.

**Problem**

My example `data` is

```
DATE | TEAM | PLAYER
-----+------+-------
 0   |  A   |  John
 0   |  A   |  Tom
 0   |  B   |  Chris
 0   |  B   |  Rob
 1   |  A   |  John
 1   |  A   |  George
 1   |  B   |  Chris
 2   |  A   |  Rob

```

I am trying to build on object `X` so that I can do something like

```
X.loc[date, team]

```

and it will return all `players` whose last observation was for `team` on `date`.

Now to be clear, I would want

```
X.loc[0, 'A'] = ['John', 'Tom']
X.loc[0, 'B'] = ['Chris', 'Rob']

X.loc[1, 'A'] = ['John', 'Tom', 'George']
X.loc[1, 'B'] = ['Chris', 'Rob']

X.loc[2, 'A'] = ['John', 'Tom', 'George', 'Rob']
X.loc[2, 'B'] = ['Chris']

```

**Idea**

My idea was that I could 'fill in' values from previous dates for players who were not observed on that date e.g. `data_filled`

```
DATE | TEAM | PLAYER | FILLED
-----+------+--------+-------
 0   |  A   |  John  |   0
 0   |  A   |  Tom   |   0
 0   |  B   |  Chris |   0
 0   |  B   |  Rob   |   0
 1   |  A   |  John  |   0
 1   |  A   |  George|   0
 1   |  B   |  Chris |   0
 1   |  A   |  Tom   |   1
 1   |  B   |  Rob   |   1
 2   |  A   |  Rob   |   0
 2   |  A   |  John  |   1
 2   |  A   |  George|   1
 2   |  B   |  Chris |   1
 2   |  A   |  Tom   |   1

```

where I added a `FILLED` column just to represent if the row was added to `data`. Now I believe I can get what I want by

```
X = data_filled.set_index(['DATE', 'TEAM'])

```

and I can the use

```
X.loc[data, team]

```

to get the list of players.