There is a list of dicts d, in which x is an embedded list, e.g.,
d = [{"name":"Python", "x":[0,1,2,3,4,5]}, # x has 300 elements
{"name":"C++", "x":[0,1,0,3,4,4]},
{"name":"Java","x":[0,4,5,6,1]}]
I want to transform d to Dataframe, and add columns automatically for each element in x that the added column name has a prefix "abc", e,g.,
df.columns = ["name", "abc0", "abc1", ..., "abc300"]
I'm looking for an efficient way, as d has lots of dicts . When I manually added columns, Python says
PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`