📌  相关文章
📜  python - 将列表列转换为多列 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:17.753000             🧑  作者: Mango

代码示例1
# Method 1
df[['team1','team2']] = pd.DataFrame(df.column_with_list.tolist(), index= df.index)

# Method 2
df['team1'], df['team2'] = list(zip(*((x[0], x[1]) for x in df['column_with_list'].values)))