I am interested in formatting a particular column in a data frame, but am unsure as to how to go about doing so. The pandas documentation has a float_format argument for pandas.DataFrame.to_csv, but I don’t want to format all floats in this format, just one where I need like 8 decimals because I am dealing with very small numbers and precision is important.
The line of code I’m looking to modify is
filtered_res[filtered_res.keys()[:-1]].to_csv(’…/Processed/’ + i+".csv")
So if I have a column p_sim, how can I get something like .005 to display as .004994983211182?