Skip to content

Implement NaT properties/methods directly #17765

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 7 commits into from
Oct 5, 2017

Conversation

jbrockmendel
Copy link
Member

Causes build errors, referenced in #17756

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@@ -156,6 +158,44 @@ def test_NaT_methods():
assert NaT.isoformat() == 'NaT'


def test_NaT_docstrings():
Copy link
Contributor

Choose a reason for hiding this comment

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

add the issue number as a comment

ts_expected = ['freqstr', 'normalize', 'offset',
'to_julian_date', 'to_period', 'tz']
assert ts_missing == ts_expected

Copy link
Contributor

Choose a reason for hiding this comment

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

give a comment before each 'section' of the test so a future reader gets what you are testing

@jbrockmendel
Copy link
Member Author

Just added comments. Note that the test implemented here is identical (except for the new comments) to the one implemented in #17756

@jreback jreback added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Datetime Datetime data dtype labels Oct 3, 2017
@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #17765 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17765      +/-   ##
==========================================
+ Coverage   91.23%   91.24%   +<.01%     
==========================================
  Files         163      163              
  Lines       49869    49872       +3     
==========================================
+ Hits        45499    45505       +6     
+ Misses       4370     4367       -3
Flag Coverage Δ
#multiple 89.04% <ø> (+0.02%) ⬆️
#single 40.24% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.73% <0%> (-0.1%) ⬇️
pandas/io/formats/format.py 96.07% <0%> (ø) ⬆️
pandas/plotting/_converter.py 65.2% <0%> (+1.81%) ⬆️

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 2ff1241...c4f4ab5. Read the comment docs.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. small comment (can defer this unless its an easy fix; if defering can you make an issue / put on todo list)

tzname = _make_error_func('tzname', datetime)
utcoffset = _make_error_func('utcoffset', datetime)

# Timestamp has empty docstring for some methods.
Copy link
Contributor

Choose a reason for hiding this comment

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

these are not defined directly in Timestamp/_Timestamp rather directly in datetime.datetime, maybe direct to there? (I don't know where its actually defined, nor why the inheritence messes this up)

Copy link
Member Author

Choose a reason for hiding this comment

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

They are defined in Timestamp and have empty docstrings there. No idea why. Will add to todo list.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok great.

@jreback jreback added this to the 0.21.0 milestone Oct 4, 2017
@jreback jreback merged commit 37860a5 into pandas-dev:master Oct 5, 2017
@jreback
Copy link
Contributor

jreback commented Oct 5, 2017

thanks!

ghost pushed a commit to reef-technologies/pandas that referenced this pull request Oct 16, 2017
@jbrockmendel jbrockmendel deleted the tslibs-nattype1 branch October 30, 2017 16:25
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants