**Scenario:** I retrieved 3 lists from a N-triples file, and now I am trying to combine them into a single, organized list.

**Original format:**

```
+--------+---------+--------+
| 100021 | hasdata | y      |
+--------+---------+--------+
| 100021 | name    | USER1  |
+--------+---------+--------+
| 100021 | extra1  | typer  |
+--------+---------+--------+
| 100021 | extra2  | reader |
+--------+---------+--------+
| 50003  | hasdata | y      |
+--------+---------+--------+
| 50003  | name    | USER2  |
+--------+---------+--------+
| 50003  | extra1  | reader |
+--------+---------+--------+
| 50003  | extra2  | writer |
+--------+---------+--------+
| 50003  | extra3  | coder  |
+--------+---------+--------+
| 30007  | hasdata | n      |
+--------+---------+--------+
| 30007  | name    | 0001   |
+--------+---------+--------+
| 30007  | extra1  | Null   |
+--------+---------+--------+

```

While looping the ntriples file, I produced 3 lists (each is a column of the table above). I am now trying to match them into something like this:

```
+--------+---------+-------+--------+--------+--------+
|        | hasdata | name  | extra1 | extra2 | extra3 |
+--------+---------+-------+--------+--------+--------+
| 100021 | y       | USER1 | typer  | reader |        |
+--------+---------+-------+--------+--------+--------+
| 50003  | y       | USER2 | reader | writer | coder  |
+--------+---------+-------+--------+--------+--------+
| 30007  | extra2  | n     | 0001   | Null   |        |
+--------+---------+-------+--------+--------+--------+

```

So far, I used the function:

```
def listOfTuples(l1, l2, l3): 
    return list(map(lambda x, y, z:(x,y, z), l1, l2, l3)) 

```

But this only gave me a direct merge of correspondent items. 

**Question:** I know it is possible to loop through the lists and get the matching items and build an array/dataframe manually. My question is is there any function or package that can do this automatically and in a less convoluted way?

**Obs:** I already have a way to produce the dataframe by looping manually. I just wanted to know if there is another more efficient way.