Skip to content
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

order of exceptions in array_to_datetime #19621

Merged
merged 5 commits into from
Feb 10, 2018

Conversation

jbrockmendel
Copy link
Member

First, cleans things up by moving all the seen_datetime and seen_integer variables to the tops of their respective blocks.

Mainly splits the try: block for string_to_dts up into two pieces based on the two lines in that block that could raise and handles errors more specfically.

@codecov
Copy link

codecov bot commented Feb 9, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19621      +/-   ##
==========================================
+ Coverage   91.59%    91.6%   +<.01%     
==========================================
  Files         150      150              
  Lines       48795    48798       +3     
==========================================
+ Hits        44696    44699       +3     
  Misses       4099     4099
Flag Coverage Δ
#multiple 89.97% <ø> (ø) ⬆️
#single 41.73% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/base.py 60.6% <0%> (+3.93%) ⬆️

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 a214915...f70792b. 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.

small comment to consilidate the six-like things (PY2/PY3) in util.pxd. but ok otherwise.

@@ -56,6 +56,8 @@ from tslibs.timestamps cimport (create_timestamp_from_ts,
_NS_UPPER_BOUND, _NS_LOWER_BOUND)
from tslibs.timestamps import Timestamp

cdef bint PY2 = str == bytes
Copy link
Contributor

Choose a reason for hiding this comment

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

move to util.pxd!

@jreback jreback added Datetime Datetime data dtype 2/3 Compat labels Feb 10, 2018
@jreback jreback added this to the 0.23.0 milestone Feb 10, 2018
@jreback jreback merged commit d7797b4 into pandas-dev:master Feb 10, 2018
@jreback
Copy link
Contributor

jreback commented Feb 10, 2018

thanks. ideally want to split up these giant functions (e.g. make smaller functions to handle different types, like the strings) so it easier to read. but progress.

@jbrockmendel jbrockmendel deleted the array_to_datetime2 branch February 10, 2018 17:28
harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants