Question: I have a Python list of lists of coordinates like the one below (let's call it `sampled_list`):

```py
sampled_list
[[100, 5],
 [200, 1],
 [300, 2],
 [400, 3],
 [500, 9]]

```

What I would like to obtain is a Pandas DataFrame where its columns correspond to the X and Y coordinates, respectively. Resulting in something like below (let's call it `df`):

```py
df
|   X   |  Y  |
| ----- | ----|
|  100  |  5  |
|  200  |  1  |
|  300  |  2  |
|  400  |  3  |
|  500  |  9  |

```

How can this be done? I have tried the [`.explode()` method](https://pandas.pydata.org/docs/reference/api/pandas.Series.explode.html) but with no luck since I get stuck with the resulting multi-index.

Answer: 
You simply need the [`DataFrame`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) constructor:

```
df = pd.DataFrame(sampled_list, columns=['X', 'Y'])

```

output:

```
     X  Y
0  100  5
1  200  1
2  300  2
3  400  3
4  500  9

```

used input:

```
sampled_list = [[100, 5],
                [200, 1],
                [300, 2],
                [400, 3],
                [500, 9]]

```
```
pd.DataFrame(lst,columns=['X','Y'])

    X  Y
0  100  5
1  200  1
2  300  2
3  400  3
4  500  9

```