Skip to content

Commit 8ef921f

Browse files
committed
fix doc-string to conform with behavior in GH9562
1 parent 1d94dd2 commit 8ef921f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tseries/index.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -716,13 +716,15 @@ def to_series(self, keep_tz=False):
716716
717717
If keep_tz is True:
718718
719-
If the timezone is not set or is UTC, the resulting
719+
If the timezone is not set, the resulting
720720
Series will have a datetime64[ns] dtype.
721-
Otherwise the Series will have an object dtype.
721+
Otherwise the Series will have an object dtype; the
722+
tz will be preserved.
722723
723724
If keep_tz is False:
724725
725-
Series will have a datetime64[ns] dtype.
726+
Series will have a datetime64[ns] dtype. TZ aware
727+
objects will have the tz removed.
726728
727729
Returns
728730
-------

0 commit comments

Comments
 (0)