From 051841b2974a403602c8b04463eb58ca833d1769 Mon Sep 17 00:00:00 2001 From: hasnain2808 Date: Thu, 19 Dec 2019 23:11:17 +0530 Subject: [PATCH 1/2] format replaced with f-strings ENH #29547 --- pandas/core/indexers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pandas/core/indexers.py b/pandas/core/indexers.py index 433bca940c028..ebd79650b7109 100644 --- a/pandas/core/indexers.py +++ b/pandas/core/indexers.py @@ -144,9 +144,7 @@ def validate_indices(indices: np.ndarray, n: int) -> None: if len(indices): min_idx = indices.min() if min_idx < -1: - msg = "'indices' contains values less than allowed ({} < {})".format( - min_idx, -1 - ) + msg = f"'indices' contains values less than allowed ({min_idx} < {-1})" raise ValueError(msg) max_idx = indices.max() From 47853bc02be6a798a0b88d53309e78b6a655a42d Mon Sep 17 00:00:00 2001 From: hasnain2808 Date: Fri, 20 Dec 2019 02:24:23 +0530 Subject: [PATCH 2/2] format replaced with f-strings requested changes made --- pandas/core/indexers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexers.py b/pandas/core/indexers.py index ebd79650b7109..209f889e809c3 100644 --- a/pandas/core/indexers.py +++ b/pandas/core/indexers.py @@ -144,7 +144,7 @@ def validate_indices(indices: np.ndarray, n: int) -> None: if len(indices): min_idx = indices.min() if min_idx < -1: - msg = f"'indices' contains values less than allowed ({min_idx} < {-1})" + msg = f"'indices' contains values less than allowed ({min_idx} < -1)" raise ValueError(msg) max_idx = indices.max()