Skip to content

Commit 89a76f6

Browse files
authored
DOC: Add datetime.tzinfo to paramater tz in tz_localize and tz_convert (#50742)
add datetime.tzinfo to paramater tz
1 parent 3ff71e4 commit 89a76f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/arrays/datetimes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ def tz_convert(self, tz) -> DatetimeArray:
803803
804804
Parameters
805805
----------
806-
tz : str, pytz.timezone, dateutil.tz.tzfile or None
806+
tz : str, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
807807
Time zone for time. Corresponding timestamps would be converted
808808
to this time zone of the Datetime Array/Index. A `tz` of None will
809809
convert to UTC and remove the timezone information.
@@ -892,7 +892,7 @@ def tz_localize(
892892
893893
Parameters
894894
----------
895-
tz : str, pytz.timezone, dateutil.tz.tzfile or None
895+
tz : str, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
896896
Time zone to convert timestamps to. Passing ``None`` will
897897
remove the time zone information preserving local time.
898898
ambiguous : 'infer', 'NaT', bool array, default 'raise'

0 commit comments

Comments
 (0)