I'm trying to create a csv
with pandas, but when I export the data to csv
it gives me an extra column
d = {'one' : pd.Series([1., 2., 3.]),'two' : pd.Series([1., 2., 3., 4.])}
df0_fa = pd.DataFrame(d)
df_csv = df0_fa.to_csv('revenue/data/test.csv',mode = 'w')
Thus, my result is:
,one,two
0,1.0,1.0
1,2.0,2.0
2,3.0,3.0
3,4.0,4.0
But, the expected results are:
one,two
1.0,1.0
2.0,2.0
3.0,3.0
4.0,4.0
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…