channels = [int(c) if c != "" else "" for c in data.pop("channels")]
columns = pd.MultiIndex.from_tuples(list(zip(features, channels)),
names=["feature", "channel"])
fset = pd.DataFrame(data.pop("values"), index=data.pop("index"),
columns=columns)
return fset, data
After Change
names=["feature", "channel"])
for k, v in data.items():
if len(v.dtype) > 0:
data[k] = pd.DataFrame.from_records(v, index="index")
return fset, data