-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
Changes from 21 commits
215a049
a8748aa
93be1c4
a0caac6
9f37013
d0ce00e
6e33152
ce8fa9c
de1373e
a0c4e2b
f095a74
ba4e823
0291828
f63c5bd
af1ea2a
85dd861
dd6e292
243d650
cff2f7d
11e1710
9a799b8
f757af8
6699cf8
95d551f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this? |
||
assert pd.eval("floor(0.9 + floor(1.2+2.3))") == 3.0 | ||
assert pd.eval("floor(1.2+2.3)") == 3.0 | ||
|
||
def test_float_truncation(self): | ||
# GH 14241 | ||
exp = "1000000000.006" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,3 +88,13 @@ def test_concat_mismatched_categoricals_with_empty(): | |
result = _concat.concat_compat([ser1._values, ser2._values]) | ||
expected = pd.concat([ser1, ser2])._values | ||
tm.assert_categorical_equal(result, expected) | ||
|
||
|
||
def test_no_tz_concat_without_copy(): | ||
# This will raise a ValueError issue if it fails | ||
# 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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you parameterize on copy=[True, False] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you push up the change |
||
expected = df | ||
tm.assert_frame_equal(result, expected) |
There was a problem hiding this comment.
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?