I want to create a table with python and fill it in this way:

I have my data like this: (X,Y,Value)

The X-values are the header of my columns.

The Y-values are the header of my rows.

```
   |     X_1      |       X_2      | ...
   | ------------ | -------------- |

```

| Y\_1 || Val\_1 | Val\_3 | ...
| Y\_2 || Val\_2 | Val\_4 | ...
... ... ...

For every (X,Y) i have to write some Value.

All my data are lists. The output file can be an Excel-Worksheet or a csv-file.

What's the best way to create this table step by step ? Is it possible with pandas-dataframes ?