将列表值导出到CSV
本帖最后由 Handsome_zhou 于 2022-2-16 18:51 编辑import pandas as pd
import numpy as np
y_data = [2.99189717, 2.36400202, 2.62322944, 2.50198149, 1.82553204,
2.1843981 , 2.07779931, 1.64305964, 1.6650876 , 1.55984897,
1.41681096, 1.10685423, 0.90651111, 1.27832451, 1.48799991,
0.72769139, 0.90413355, 1.27063563, 0.82380943, 0.31488385,
1.09758897, 0.88535323, 0.55244086, 1.08387588, 0.80641698,
0.32199372, 0.81254124, 0.55532858, 0.60831015, 0.57465773,
0.40105978, 0.33875048, 0.51969454, 0.50341296, 0.41554305,
0.20819871, 0.80233134, 0.63805256, 0.28924434, 0.4728277 ,
0.54610608, 0.49059336, 0.66803274, 0.64541091, 0.43811072,
0.81862633, 0.54579578, 0.83349952, 0.53375814, 0.83372931]
df1 = pd.DataFrame(y_data)
df1.to_csv('your_dictionary/name.csv')
页:
[1]