我正在网上查看,我可以看到如何从Pandas中的列表创建列,但是我希望我的列在每个列表的行中具有重复值
示例如下:
students = ['John','Sally','Mike']
tests = ['Math1','CompSci1','English1']
****Desired Outcome from List*****
'Student' 'Test'
John Math1
John CompSci1
John English1
Sally Math1
Sally CompSci1
Sally English1
Mike Math1
Mike CompSci1
Mike English1
谢谢你的帮助
一种方法是
itertools.product
:输出:
相关问题 更多 >
编程相关推荐