File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3879,11 +3879,13 @@ def to_csv(
38793879 >>> os.makedirs("folder/subfolder", exist_ok=True) # doctest: +SKIP
38803880 >>> df.to_csv("folder/subfolder/out.csv") # doctest: +SKIP
38813881
3882- Format floating-point numbers using float_format:
3883- - Format floats to two decimal places:
3884- >>> df.to_csv("out1.csv", float_format="%.2f") # doctest: +SKIP
3885- - Use scientific notation:
3886- >>> df.to_csv("out2.csv", float_format="{:.2e}".format) # doctest: +SKIP
3882+ Format floats to two decimal places:
3883+
3884+ >>> df.to_csv("out1.csv", float_format="%.2f") # doctest: +SKIP
3885+
3886+ Format floats using scientific notation:
3887+
3888+ >>> df.to_csv("out2.csv", float_format="{:.2e}".format) # doctest: +SKIP
38873889 """
38883890 df = self if isinstance (self , ABCDataFrame ) else self .to_frame ()
38893891
You can’t perform that action at this time.
0 commit comments