【发布时间】:2014-02-16 00:06:11
【问题描述】:
Choice1 Choice2 Choice3
A 1 5 9
B 2 6 10
C 3 7 11
D 4 8 12
我如何生成所有可能的组合,包括 python 中每一行的一个选项?
【问题讨论】:
-
不知道您是否需要特定于 pandas 的解决方案,但如果没有 pandas,那就是
itertools.product(*rowlist)。 -
查看您的列名,我觉得可能有更好的方法来做您想做的事。您在这里的最终目标是什么?
标签: python pandas combinations