Skip to content

BUG: Append DataFrame to Series with dateutil timezone #23685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add better comments
  • Loading branch information
Matt Roeschke committed Nov 14, 2018
commit 0479c3069bae6bfc60811c376b5b59522d88f0a6
6 changes: 3 additions & 3 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1641,16 +1641,16 @@ def is_datetime_with_singletz_array(values: ndarray) -> bool:

if n == 0:
return False
# Get a reference timezone to compare with the rest
# Get a reference timezone to compare with the rest of the tzs in the array
for i in range(n):
base_val = values[i]
if base_val is not NaT:
base_tz = get_timezone(getattr(base_val, 'tzinfo', None))
break

# Compare the reference timezone with the rest of the timezones
# in the array
for j in range(i, n):
# Compare val's timezone with the reference timezone
# NaT can coexist with tz-aware datetimes, so skip if encountered
val = values[j]
if val is not NaT:
tz = getattr(val, 'tzinfo', None)
Expand Down