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

BUG: Retain timezone information in to_datetime if box=False #22457

Merged
merged 3 commits into from Aug 24, 2018

Conversation

mroeschke
Copy link
Member

Don't think this requires a whatsnew entry since this was introduced in (and part of) #21822 which is slated for v0.24.0

@jreback
Copy link
Contributor

jreback commented Aug 22, 2018

can you just append this issue number to the prior whatsnew entry, otherwise lgtm (failing tests though)

@jreback jreback added Bug Timezones Timezone data dtype labels Aug 22, 2018
@jreback jreback added this to the 0.24.0 milestone Aug 22, 2018
@codecov
Copy link

codecov bot commented Aug 23, 2018

Codecov Report

Merging #22457 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22457      +/-   ##
==========================================
- Coverage   92.05%   92.04%   -0.01%     
==========================================
  Files         169      169              
  Lines       50733    50743      +10     
==========================================
+ Hits        46702    46708       +6     
- Misses       4031     4035       +4
Flag Coverage Δ
#multiple 90.45% <100%> (-0.01%) ⬇️
#single 42.24% <20%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/tools/datetimes.py 85.22% <100%> (+0.14%) ⬆️
pandas/util/_depr_module.py 65.11% <0%> (-2.33%) ⬇️
pandas/core/reshape/pivot.py 96.55% <0%> (-0.63%) ⬇️
pandas/util/testing.py 85.75% <0%> (-0.11%) ⬇️
pandas/core/reshape/merge.py 94.15% <0%> (-0.01%) ⬇️
pandas/core/groupby/grouper.py 98.16% <0%> (-0.01%) ⬇️
pandas/core/generic.py 96.44% <0%> (-0.01%) ⬇️
pandas/core/frame.py 97.24% <0%> (-0.01%) ⬇️
pandas/core/arrays/integer.py 94.55% <0%> (ø) ⬆️
pandas/io/parsers.py 95.48% <0%> (ø) ⬆️
... and 2 more

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 68273a7...9f5f924. 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.

minor comments. merge away.

return DatetimeIndex._simple_new(result, name=name,
tz=tz_parsed)
if tz_parsed is not None:
if box:
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add some comments here would be great (just to make it easier to read, the block below as well)

@mroeschke mroeschke merged commit 64de074 into pandas-dev:master Aug 24, 2018
@mroeschke mroeschke deleted the parse_tz_strings_followup branch August 24, 2018 03:29
@mroeschke
Copy link
Member Author

Thanks @jreback. (Build errors were unrelated to the last commit)

Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
…dev#22457)

* BUG: Retain timezone information in to_datetime if box=False

* fix test and add issue number to whatsnew

* add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: to_datetime drops UTC offset when parsing datetime strings and box=False
2 participants