@@ -330,7 +330,7 @@ def test_pie_series(self):
330330 ax = _check_plot_works (
331331 series .plot .pie , colors = color_args , autopct = "%.2f" , fontsize = 7
332332 )
333- pcts = ["{0 :.2f}". format ( s * 100 ) for s in series .values / float (series .sum ())]
333+ pcts = [f" { s * 100 :.2f} " for s in series .values / float (series .sum ())]
334334 expected_texts = list (chain .from_iterable (zip (series .index , pcts )))
335335 self ._check_text_labels (ax .texts , expected_texts )
336336 for t in ax .texts :
@@ -865,15 +865,15 @@ def test_time_series_plot_color_with_empty_kwargs(self):
865865
866866 def test_xticklabels (self ):
867867 # GH11529
868- s = Series (np .arange (10 ), index = ["P{i:02d}" . format ( i = i ) for i in range (10 )])
868+ s = Series (np .arange (10 ), index = [f "P{ i :02d} " for i in range (10 )])
869869 _ , ax = self .plt .subplots ()
870870 ax = s .plot (xticks = [0 , 3 , 5 , 9 ], ax = ax )
871- exp = ["P{i:02d}" . format ( i = i ) for i in [0 , 3 , 5 , 9 ]]
871+ exp = [f "P{ i :02d} " for i in [0 , 3 , 5 , 9 ]]
872872 self ._check_text_labels (ax .get_xticklabels (), exp )
873873
874874 def test_xtick_barPlot (self ):
875875 # GH28172
876- s = pd .Series (range (10 ), index = ["P{i:02d}" . format ( i = i ) for i in range (10 )])
876+ s = pd .Series (range (10 ), index = [f "P{ i :02d} " for i in range (10 )])
877877 ax = s .plot .bar (xticks = range (0 , 11 , 2 ))
878878 exp = np .array (list (range (0 , 11 , 2 )))
879879 tm .assert_numpy_array_equal (exp , ax .get_xticks ())
0 commit comments