Skip to content

COMPAT: NaT support tz_localize / tz_convert (#15830) #15868

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 1 commit into from
Apr 2, 2017

Conversation

atbd
Copy link
Contributor

@atbd atbd commented Apr 2, 2017

closes #15830

  • add tz_convert/tz_localize methods
  • add tests
  • tests added / passed
  • passes git diff upstream/master --name-only -- '*.py' | flake8 --diff

@codecov
Copy link

codecov bot commented Apr 2, 2017

Codecov Report

Merging #15868 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15868      +/-   ##
==========================================
- Coverage   90.98%   90.96%   -0.02%     
==========================================
  Files         143      143              
  Lines       49449    49449              
==========================================
- Hits        44992    44983       -9     
- Misses       4457     4466       +9
Flag Coverage Δ
#multiple 88.72% <ø> (ø) ⬆️
#single 40.65% <ø> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.56% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74f527f...7c8ae63. Read the comment docs.

@@ -845,6 +845,12 @@ class NaTType(_NaT):
# GH 10939
return np.nan

def tz_localize(self):
return NPY_NAT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not necessary (that's the point of the _nat_methods code below

@jreback
Copy link
Contributor

jreback commented Apr 2, 2017

can you add a whatsnew note as well (add this issue number next to #15782 in the whatsnew)

@jreback jreback added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Datetime Datetime data dtype Compat pandas objects compatability with Numpy or Python functions labels Apr 2, 2017
@atbd
Copy link
Contributor Author

atbd commented Apr 2, 2017

Thanks, I erased the unnecessary methods and add the wathsnew note

@jreback jreback added this to the 0.20.0 milestone Apr 2, 2017
@jreback jreback merged commit a293d22 into pandas-dev:master Apr 2, 2017
@jreback
Copy link
Contributor

jreback commented Apr 2, 2017

thanks @atbd nice PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

COMPAT: NaT should support tz_localize / tz_convert
2 participants