Suppose there is a pandas series (e.g. the following)

```
1 A
2 C
3 A
4 B
5 C

```

There is also a list of elements, e.g. [A,B,C,D]. The goal is to get a dataframe with columns of this list and the same rows, as in series, and each cell is a Boolean value which indicates if the value in series is equal to value of column. In my example it would be the following:

```
    A     B     C     D
1 True  False False False
2 False False True  False
3 True  False False False
4 False True  False False
5 False False True  False

```

Of course this can be achieved with a simple for loop (smth like this:)

```
for i in the_list:
   df[i] = the_series == i

```

But this is painfully slow, especially when the list is large. So what I am asking is if there is a faster "pandas-style" way to achieve this?