Problem Definition
I have multiple lists of tuples that I want to convert into a single pandas Dataframe, but I haven't found a performant way of doing it so far.
Current Output:
column_a column_b
2005-01-02 22:15:00 (1, 1) (True, 0, 0)
2005-01-02 22:30:00 (0, 0) (True, 0, 0)
2005-01-02 22:45:00 (0, 0) (True, 0, 0)
2005-01-02 23:00:00 (0, 0) (True, 0, 0)
2005-01-02 23:15:00 (0, 0) (True, 0, 0)
Desired output:
column_a column_b column_c column_d, column_e
2005-01-02 22:15:00 1 1 True 0 0
2005-01-02 22:30:00 0 0 True 0 0
2005-01-02 22:45:00 0 0 True 0 0
2005-01-02 23:00:00 0 0 True 0 0
2005-01-02 23:15:00 0 0 True 0 0
Solution I've tried but I am not satisfied with
I tried converting column_a and column_b to pandas DataFrames and then joining them, but I found this to be way too slow to scalate with a larger number of lists of tuples (which I expect to have).
Next solution I am going to try
I will to try to convert this list of tuples in a list of lists, and then append this with the other lists of lists (converted from list of tuples) and then to pandas DataFrame.