📜  pandas 笛卡尔积 - Python 代码示例

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

代码示例1
a = [1, 2, 3]
b = ["a", "b", "c"]

index = pd.MultiIndex.from_product([a, b], names = ["a", "b"])

pd.DataFrame(index = index).reset_index()