I have a dataframe that has keys in one column and values in another column. I'm trying to find a way to make this into a 3 column dataframe. But....if I'm missing a 1 or 2 key value, I want pandas to populate an N/A.
What I have:
| key | Number |
+-----+--------+
| 0 | 10 |
| 1 | 20 |
| 2 | 30 |
| 0 | 40 |
| 1 | 50 |
| 2 | 60 |
+-----+--------+
What I want:
+---------+---------+---------+
| Column1 | Column2 | Column3 |
+---------+---------+---------+
| 10 | 20 | 30 |
| 40 | 50 | 60 |
+---------+---------+---------+