File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1828,7 +1828,7 @@ Best practices
18281828.. ipython :: python
18291829
18301830 from io import StringIO
1831-
1831+
18321832 def test_roundtrip_precision (df , float_format ):
18331833 """ Test if a float_format preserves data during CSV roundtrip."""
18341834 csv_string = df.to_csv(index = False , float_format = float_format)
@@ -1841,7 +1841,8 @@ Best practices
18411841 # Test different precisions
18421842 for fmt in [' %.6g ' , ' %.10g ' , ' %.15g ' ]:
18431843 success = test_roundtrip_precision(test_df, fmt)
1844- print (f " Format { fmt} : { ' ✓' if success else ' ✗' } roundtrip success " )
1844+ status = ' ✓' if success else ' ✗'
1845+ print (" Format {} : {} roundtrip success" .format(fmt, status))
18451846
18461847 .. ipython :: python
18471848 :suppress:
You can’t perform that action at this time.
0 commit comments