应该不会太难解决,只是我无法理解…
for x in range (1, len(df)):
spatial_frequency.append(df.loc[:, ["Spatial Frequency [lp/mm]."]])
目标是存储每个"空间频率"。在数组中。像这样写每一行都可以,但我希望它在一个循环中
spatial_frequency[1] = df.loc[:, ["Spatial Frequency [lp/mm].1"]]
我想从1->length开始循环,并存储每个" special frequency"数组中的元素。索引格式的组合("; ", "x")对我不起作用,有人能帮助我吗?
for x in range (1, len(df)):
spatial_frequency.append(df.loc[:, [f"Spatial Frequency [lp/mm].{x}"]])