From c5de493156ae7ae7db85076a4d179e45545e6501 Mon Sep 17 00:00:00 2001 From: Julian Fleischer Date: Thu, 15 Jul 2021 02:45:18 +0200 Subject: [PATCH] Make components of Suffixes Optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documentation on the parameters that actually are of type `Suffixes`: > *suffixeslist-like, default is (“_x”, “_y”)* > A length-2 sequence where each element is optionally a string indicating the suffix to add to overlapping column names in left and right respectively. Pass a value of None instead of a string to indicate that the column name from left or right should be left as-is, with no suffix. At least one of the values must not be None. --- pandas/_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_typing.py b/pandas/_typing.py index 9c20eb12dc7fc..68ec331c2781f 100644 --- a/pandas/_typing.py +++ b/pandas/_typing.py @@ -111,7 +111,7 @@ IndexLabel = Union[Hashable, Sequence[Hashable]] Level = Union[Hashable, int] Shape = Tuple[int, ...] -Suffixes = Tuple[str, str] +Suffixes = Tuple[Optional[str], Optional[str]] Ordered = Optional[bool] JSONSerializable = Optional[Union[PythonScalar, List, Dict]] Frequency = Union[str, "DateOffset"]