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: Append DataFrame to Series with dateutil timezone #23685

Merged
merged 5 commits into from
Nov 15, 2018

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Nov 14, 2018

@pep8speaks
Copy link

Hello @mroeschke! Thanks for submitting the PR.

@gfyoung gfyoung added Bug Timezones Timezone data dtype labels Nov 14, 2018
@TomAugspurger
Copy link
Contributor

Failure on the py2 build:

________ TestAppend.test_append_empty_frame_to_series_with_dateutil_tz _________
[gw0] linux2 -- Python 2.7.15 /home/travis/miniconda3/envs/pandas/bin/python
self = <pandas.tests.reshape.test_concat.TestAppend object at 0x7fa55d3e2390>
    def test_append_empty_frame_to_series_with_dateutil_tz(self):
        # GH 23682
>       date = Timestamp('2018-10-24 07:30:00', tz=dateutil.tz.UTC)
E       AttributeError: 'module' object has no attribute 'UTC'

I think that's using python-dateutil=2.5.0

@codecov
Copy link

codecov bot commented Nov 14, 2018

Codecov Report

Merging #23685 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #23685   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files         161      161           
  Lines       51339    51339           
=======================================
  Hits        47360    47360           
  Misses       3979     3979
Flag Coverage Δ
#multiple 90.64% <ø> (ø) ⬆️
#single 42.34% <ø> (ø) ⬆️

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 e413c49...5d563aa. Read the comment docs.

@jreback jreback added this to the 0.24.0 milestone Nov 14, 2018
@jreback jreback added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Nov 14, 2018
@jreback
Copy link
Contributor

jreback commented Nov 14, 2018

can you merge master

@mroeschke
Copy link
Member Author

Done

@jreback
Copy link
Contributor

jreback commented Nov 15, 2018

thanks!

@jreback jreback merged commit ee5e79f into pandas-dev:master Nov 15, 2018
thoo added a commit to thoo/pandas that referenced this pull request Nov 15, 2018
* upstream/master:
  BUG: to_html misses truncation indicators (...) when index=False (pandas-dev#22786)
  API/DEPR: replace "raise_conflict" with "errors" for df.update (pandas-dev#23657)
  BUG: Append DataFrame to Series with dateutil timezone (pandas-dev#23685)
  CLN/CI: Catch that stderr-warning! (pandas-dev#23706)
  ENH: Allow for join between two multi-index dataframe instances (pandas-dev#20356)
  Ensure Index._data is an ndarray (pandas-dev#23628)
  DOC: flake8-per-pr for windows users (pandas-dev#23707)
  DOC: Handle exceptions when computing contributors. (pandas-dev#23714)
  DOC: Validate space before colon docstring parameters pandas-dev#23483 (pandas-dev#23506)
  BUG-22984 Fix truncation of DataFrame representations (pandas-dev#22987)
@mroeschke mroeschke deleted the append_datutil_tz branch November 15, 2018 18:27
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
expected.loc[:, object_cols] = expected.loc[:, object_cols].astype(
object
)
assert_frame_equal(result, expected)
Copy link
Contributor

Choose a reason for hiding this comment

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

@mroeschke what were the expected dtypes of result and expected here?

On master, everything is object, which may not have been intended.

On #24024, expected has datetime64[ns, tzutc()] dtype for the date column.

Copy link
Member Author

Choose a reason for hiding this comment

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

@TomAugspurger datetime64[ns, tzutc()] would be the correct dtype. I may have cast to object due to an append bug that existed prior. Feel free to change this test in #24024

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Appending Series with dateutil timezone raises TypeError: unhashable type: 'tzutc'
5 participants