Skip to content

Commit

Permalink
add GH num to xfer
Browse files Browse the repository at this point in the history
  • Loading branch information
holymonson committed Jul 26, 2018
1 parent 43d701e commit 518b3aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ Datetimelike
Timedelta
^^^^^^^^^

- Bug in :class:`DataFrame` with ``dtype='datetime64[ns]'`` when adding :class:`Timedelta` (:issue:`22007`)
- Bug in :class:`DataFrame` with ``dtype='datetime64[ns]'`` when adding :class:`Timedelta` (:issue:`22005`)
-
-

Expand Down
4 changes: 4 additions & 0 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,14 @@ def test_df_sub_datetime64_not_ns(self):
np.timedelta64(1, 'D')
])
def test_timestamp_df_add_timedelta(self, other):
# GH 22005
expected = pd.DataFrame([pd.Timestamp('2018-01-02')])
result = pd.DataFrame([pd.Timestamp('2018-01-01')]) + other
tm.assert_frame_equal(result, expected)

result = pd.DataFrame([pd.Timestamp('2018-01-03')]) - other
tm.assert_frame_equal(result, expected)

result = other + pd.DataFrame([pd.Timestamp('2018-01-01')])
tm.assert_frame_equal(result, expected)

Expand Down

0 comments on commit 518b3aa

Please sign in to comment.