Skip to content

Backport PR #32166 on branch 1.0.x #32269

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

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Feb 26, 2020

@jbrockmendel jbrockmendel changed the title REGR: preserve freq in DTI/TDI outer join (#32166) Backport PR #32166 on branch 1.0.x Feb 26, 2020
@jbrockmendel jbrockmendel added this to the 1.0.2 milestone Feb 26, 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 @jbrockmendel. Should the backport mirror the original PR more closely?

assert cols.dtype == joined.dtype
tm.assert_index_equal(cols, joined)

def test_join_preserves_freq(self):
Copy link
Member

Choose a reason for hiding this comment

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

only this test should be backported

aware.join(naive)

@pytest.mark.parametrize("tz", [None, "US/Pacific"])
def test_join_preserves_freq(self, tz):
Copy link
Member

Choose a reason for hiding this comment

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

only this test should be backported

return self._simple_new(joined, name, **kwargs)

freq = self.freq if self._can_fast_union(other) else None
new_data = type(self._data)._simple_new( # type: ignore
Copy link
Member

Choose a reason for hiding this comment

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

can you add a comment why the type:ignore has been added.

@jreback jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Datetime Datetime data dtype labels Feb 27, 2020
@jreback jreback merged commit 84018bd into pandas-dev:1.0.x Feb 27, 2020
@jreback
Copy link
Contributor

jreback commented Feb 27, 2020

this is fine, has some extra tests which are nbd.

@jbrockmendel jbrockmendel deleted the auto-backport-of-pr-32166-on-1.0.x branch February 27, 2020 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants