所以我有几个列表,它们是数据文件中变量的标题。设置如下所示:
headerGroup1 = ["1", "2", "3, "4", "5"] headerGroup2 = ["6", "7", "8, "9", "10"] headerGroup3 = ["1", "2", "3", "4", "5"]
我有一个主文件如下:
masterVars = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
我想做三件事:
我想如果只有两张单子的话,这会很简单。我想我遇到的一个大问题是,在将数据预先添加到列表项之后会发生什么。但我不太清楚我到底搞砸了什么。在
编辑时间:
下面是我想要输出的示例:
newMasterFile = ["headerGroup1, headerGroup3, 1", "headerGroup1, headerGroup3, 2", etc.]
这有什么更清楚的吗?在
它已经“排序”(引用引号,因为你从来没有解释过你想要什么顺序),但是假设它不是:
如果不知道值是否唯一,并且希望它们唯一,请将其转换为
^{pr2}$set
。在或者你喜欢更易读的版本?;)
什么是SPSS?在
相关问题 更多 >
编程相关推荐