I'm saving a dataframe with the method to_csv
, and the output is like that:
2015 04 08 0.0 14.9
2015 04 09 0.0 9.8
2015 04 10 0.3 23.0
but I need to make some modifications to this output, I need to add a comment and a column with a constant value and the same size that the others columns. I need to obtain an output like this one:
#Data from the ...
#yyyy mm dd pcp temp er
2015 04 08 0.0 14.9 0
2015 04 09 0.0 9.8 0
2015 04 10 0.3 23.0 0
Does anyone know how to do that?