8000 PERF: Datetime/Timestamp.normalize for timezone naive datetimes by mroeschke · Pull Request #23634 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

PERF: Datetime/Timestamp.normalize for timezone naive datetimes #23634

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 19 commits into from
Nov 18, 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
use notna instead
  • Loading branch information
Matt Roeschke committed Nov 18, 2018
commit fb11dcfb3af96b2c47df5680bd5e9d6af33d60b4
2 changes: 1 addition & 1 deletion pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def normalize(self):
dtype='datetime64[ns, Asia/Calcutta]', freq=None)
"""
if self.tz is None or timezones.is_utc(self.tz):
not_null = self.notnull()
not_null = self.notna()
DAY_NS = ccalendar.DAY_SECONDS * 1000000000
new_values = self.asi8.copy()
adjustment = (new_values[not_null] % DAY_NS)
Expand Down
0