Skip to content

TST: concat(..., copy=False) with datetime tz-aware data raises ValueError: cannot create a DatetimeTZBlock without a tz #33458

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 24 commits into from
Jul 13, 2020

Conversation

SurajH1
Copy link
Contributor

@SurajH1 SurajH1 commented Apr 10, 2020

…it fails on version 0.24.1 but passes on current version
@pep8speaks
Copy link

pep8speaks commented Apr 10, 2020

Hello @SurajH1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-07-12 10:18:23 UTC

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Thanks - looks good. Some minor feedback

@WillAyd WillAyd added the Testing pandas testing functions or related to the test suite label Apr 10, 2020
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.

pls merge master and ping on green.

# Regression test for issue 25257
df = pd.DataFrame({'timestamp': [pd.Timestamp('2020-04-08 09:00:00.709949+0000',
tz='UTC')], })
result = pd.concat([df], copy=False)
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 parameterize on copy=[True, False]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved

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 push up the change

@jreback jreback added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Apr 10, 2020
SurajH1 added 10 commits April 13, 2020 19:45
…mit to test out normally with floor(1) + floor(2)
…xpression before returning res() of the value which was an abstraction of the floor function being passed in
…this commit to test out normally with floor(1) + floor(2)"

This reverts commit f095a74.
This reverts commit ce8fa9c.
@SurajH1
Copy link
Contributor Author

SurajH1 commented Apr 19, 2020

I'm not sure why the Publish benchmarks artifact error is popping up on Travis-CI tests. Any help would be appreciated @jreback

@jreback jreback added the Timezones Timezone data dtype label Jun 14, 2020
@jreback jreback changed the title Added in a regression test for issue #25257. Verified that it fails o… TST: concat(..., copy=False) with datetime tz-aware data raises ValueError: cannot create a DatetimeTZBlock without a tz Jun 14, 2020
@jreback
Copy link
Contributor

jreback commented Jun 14, 2020

can you merge master

@@ -670,19 +670,26 @@ def visit_Call(self, node, side=None, **kwargs):
)

return res(*new_args)
elif isinstance(res, np.ufunc):
new_args = [self.visit(arg) for arg in node.args]
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this for / from?

@@ -727,6 +727,10 @@ def test_line_continuation(self):
result = pd.eval(exp, engine=self.engine, parser=self.parser)
assert result == 12

def test_floor_expression(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this?

# Regression test for issue 25257
df = pd.DataFrame({'timestamp': [pd.Timestamp('2020-04-08 09:00:00.709949+0000',
tz='UTC')], })
result = pd.concat([df], copy=False)
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 push up the change

@simonjayhawkins
Copy link
Member

@SurajH1 i've pushed a few changes to the branch of this PR. I notice you raised the PR from master. In future you should create a seperate branch, see https://pandas.pydata.org/docs/dev/development/contributing.html#creating-a-branch

@simonjayhawkins simonjayhawkins added this to the 1.1 milestone Jul 12, 2020
Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

Thanks @SurajH1 lgtm. @jreback @WillAyd

@jorisvandenbossche jorisvandenbossche merged commit f477a0e into pandas-dev:master Jul 13, 2020
@jorisvandenbossche
Copy link
Member

Thanks @SurajH1 and @simonjayhawkins !

fangchenli pushed a commit to fangchenli/pandas that referenced this pull request Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode Testing pandas testing functions or related to the test suite Timezones Timezone data dtype
Projects
None yet
6 participants