Question: Whilst applying the below function I have bool values converted to integers.

What am I missing?

```
import pandas as pd

def multi(x):
    if isinstance(x, (float, int)):
        return x * 10
    return x

print(pd.DataFrame(data={"a": [True, False]}).applymap(func=multi))

```

Ouput:

```
    a
0  10
1   0

```

Expected:

```
       a
0   True
1   False

```

Answer: 
`.` match with any character so that

`222` match with

```
-------------
| 2 | 2 | 2 |
-------------
|   |   |   |
-------------
|   |   |   |
-------------

OR

-------------
|   |   |   |
-------------
| 2 | 2 | 2 |
-------------
|   |   |   |
-------------

OR

-------------
|   |   |   |
-------------
|   |   |   |
-------------
| 2 | 2 | 2 |
-------------

```

and `2...2...2` match with

```
-------------
| 2 | . | . | . 
-------------
| 2 | . | . | . 
-------------
| 2 |   |   | 
-------------

OR

-------------
|   | 2 | . | . 
-------------
| . | 2 | . | . 
-------------
| . | 2 |   | 
-------------

OR

-------------
|   |   | 2 | . 
-------------
| . | . | 2 | . 
-------------
| . | . | 2 |
-------------

```

the `.` outside the board match with the separator `-` .

And the other two are more or less the same.
In a regular expressions alternative patterns are separated by `|` and `.` matches exactly any one character.

The board in converted to a string, that looks like this:

```
001-012-210

```

That means player `1` wins, when

* they filled a row, which means the string contains the substring `111`
* they filled a column, which means the string is either
`1xx-1xx-1xx` , `x1x-x1x-x1x` or `xx1-xx1-xx1`. In these cases there are exactly three characters between each `1`, which is matched by `1...1...1` in the regular expression.
* they filled a diagonal, which means the string is either `xx1-x1x-1xx` or `1xx-x1x-xx1`. In these cases there are either exactly two or four characters between each `1`, which are matched by either `1..1..1` or `1....1...1`.