Skip to content

Conversation

egoddard
Copy link
Contributor

@egoddard egoddard commented Aug 6, 2020

Copy link
Contributor

@arw2019 arw2019 left a comment

Choose a reason for hiding this comment

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

comment re: test placement

otherwise lgtm


tm.assert_series_equal(result, expected)

# IntegerArray Series with nulls
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks like other tests for missing values are in

def test_to_timedelta_on_missing_values(self):

so might want to move this part there

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, I would maybe just put this new code in its own test (so a test specifically for passing nullable Int64 dtype data)

@TomAugspurger
Copy link
Contributor

We'll need a release note. This can go in 1.1.1 I think.

@TomAugspurger TomAugspurger added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Timedelta Timedelta data type labels Aug 6, 2020
@TomAugspurger TomAugspurger added this to the 1.1.1 milestone Aug 6, 2020
@jreback jreback modified the milestones: 1.1.1, 1.2 Aug 6, 2020
result = pd.to_timedelta(arr, unit="ns", errors="ignore")
tm.assert_numpy_array_equal(result, arr)

def test_to_timedelta_nullable_int64_dtype(self):
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 the issue number as a comment here

@jreback jreback merged commit 1104f0d into pandas-dev:master Aug 7, 2020
@jreback
Copy link
Contributor

jreback commented Aug 7, 2020

thanks @egoddard

@jreback
Copy link
Contributor

jreback commented Aug 7, 2020

@meeseeksdev backport to 1.1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Timedelta Timedelta data type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: pd.to_timedelta() fails when arg is a Series with Int64 dtype

5 participants