Jan-20-2023, 07:22 PM
If I take you example code and write the csv to a console rather than to file...
Net_Income = [0.00000, -0.000005, -1.859603, -55.788084] df = pd.Series(Net_Income) print(df) print() x = df.to_csv(float_format="%.6f") print(x)... I see this:
Output:df
0 0.000000
1 -0.000005
2 -1.859603
3 -55.788084
dtype: float64
csv
,0
0,0.000000
1,-0.000005
2,-1.859603
3,-55.788084
There should be no difference when writing to a file.
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein