Given a dataframe:
FrameLen FrameCapLen IPHdrLen IPLen ... Loss_25 Loss_50 Interval PacketTime
0 [118.0, 66.0] [118.0, 66.0] [20.0, 20.0] [104.0, 52.0] ... [0.0, 0.0] [0.0, 0.0] [918.0, 918.0] 0.000031
1 [120.0, 66.0] [120.0, 66.0] [20.0, 20.0] [106.0, 52.0] ... [0.0, 0.0] [0.0, 0.0] [3527.0, 3527.0] 0.000011
2 [117.0, 66.0] [117.0, 66.0] [20.0, 20.0] [103.0, 52.0] ... [0.0, 0.0] [0.0, 0.0] [1256.0, 1256.0] 0.000016
3 [118.0, 66.0] [118.0, 66.0] [20.0, 20.0] [104.0, 52.0] ... [0.0, 0.0] [0.0, 0.0] [652.0, 652.0] 0.000017
4 [119.0, 66.0] [119.0, 66.0] [20.0, 20.0] [105.0, 52.0] ... [0.0, 0.0] [0.0, 0.0] [44.0, 44.0] 0.000032
... ... ... ... ... ... ... ... ... ...
83287 [117.0, 66.0] [117.0, 66.0] [20.0, 20.0] [103.0, 52.0] ... [0.0, 0.0] [0.0, 0.0] [472.0, 472.0] 0.000024
All the columns containing a list have the following types:
<class 'pandas.core.series.Series'>
0 [118.0, 66.0]
1 [120.0, 66.0]
2 [117.0, 66.0]
3 [118.0, 66.0]
4 [119.0, 66.0]
...
83287 [117.0, 66.0]
83288 [120.0, 66.0]
83289 [117.0, 66.0]
83290 [116.0, 66.0]
83291 [122.0, 66.0]
How can I expand these series for each column containing a Series, such that the result is:
FrameLen_1 FrameLen_2 FrameCapLen_1, ..., ...
118.0 66.0 118.0
It would be great if this can be done, under the assumption that one may not know how many columns contain a Series.