I have a pandas dataframe with 0 rows and 58 columns, but for the sake of illustration let's assume I have a dataframe with 0 rows and 3 columns that looks like this:
| col1 | col2 | col3 |
|---|
I need to expand this table to represent all possible combinations of one-hot-encoded vectors like this:
| col1 | col2 | col3 |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 0 |
| 1 | 0 | 0 |
| 0 | 0 | 1 |
| 0 | 1 | 1 |
How can I do this in python?