From 2a36aa9810f4ab68232663e3df9e21427bc5b6a8 Mon Sep 17 00:00:00 2001 From: Jacek Date: Sat, 15 Feb 2020 11:29:16 +0100 Subject: [PATCH] CLN 2574 Replace old string formating --- pandas/tests/frame/test_to_csv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/frame/test_to_csv.py b/pandas/tests/frame/test_to_csv.py index aeff92971b42a..86c9a98377f3f 100644 --- a/pandas/tests/frame/test_to_csv.py +++ b/pandas/tests/frame/test_to_csv.py @@ -687,7 +687,7 @@ def _make_frame(names=None): df.to_csv(path) for i in [6, 7]: - msg = "len of {i}, but only 5 lines in file".format(i=i) + msg = f"len of {i}, but only 5 lines in file" with pytest.raises(ParserError, match=msg): read_csv(path, header=list(range(i)), index_col=0) @@ -744,7 +744,7 @@ def test_to_csv_withcommas(self): def test_to_csv_mixed(self): def create_cols(name): - return ["{name}{i:03d}".format(name=name, i=i) for i in range(5)] + return [f"{name}{i:03d}" for i in range(5)] df_float = DataFrame( np.random.randn(100, 5), dtype="float64", columns=create_cols("float")