數字字符串分拆名單線讀我有一個具有以下格式的數字字符串值多行csv文件:2行在蟒蛇
CSV樣本:
[['ASA00211063', '2005'], [-0.434358, -0.793407, -1.070576, nan, nan,...(365 values)], [0.354615, -0.108102,nan,...(365 values)]]
[['AFR02516075', '1998'], [-0.434358, -0.7934039, -1.0705767, nan, nan,...(365 values)], [0.3546153, -0.1081022, nan,...(365 values)]]
哪有我CSV文件分割以及加入到列表中,這樣放出來是:
list[0] = ['ASA00211063', '2005'], ['AFR02516075', '1998']...
list[1] = [-0.434358, -0.793407, -1.070576, nan, nan,..., 0.354615, -0.108102,nan,...(**730** values)]
list[2] = [-0.434358, -0.7934039, -1.0705767, nan, nan,..., 0.3546153, -0.1081022, nan,...(**730** values)]
確實的CSV包含'[['和']]'的符號? –
是的,它確實有[[和]]符號並被視爲字符串 – ASG