Skip to content

BUG: constructors #49875

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 6 commits into from
Nov 29, 2022
Merged

BUG: constructors #49875

merged 6 commits into from
Nov 29, 2022

Conversation

jbrockmendel
Copy link
Member

@@ -747,7 +749,8 @@ Reshaping
- Bug in :func:`join` when ``left_on`` or ``right_on`` is or includes a :class:`CategoricalIndex` incorrectly raising ``AttributeError`` (:issue:`48464`)
- Bug in :meth:`DataFrame.pivot_table` raising ``ValueError`` with parameter ``margins=True`` when result is an empty :class:`DataFrame` (:issue:`49240`)
- Clarified error message in :func:`merge` when passing invalid ``validate`` option (:issue:`49417`)
- Bug in :meth:`DataFrame.explode` raising ``ValueError`` on multiple columns with ``NaN`` values or empty lists (:issue:`46084`)
- Bug in :meth:`DataFrame.explode` raising ``ValueError`` on multiple columns with ``NaN`` values or empty lists (:issue:`46084`) Bug in :meth:`DataFrame.transpose` with ``IntervalDtype`` column with ``timedelta64[ns]`` endpoints (:issue:`44917`)
Copy link
Member

Choose a reason for hiding this comment

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

Guessing this is a copy / paste error with two bugs on the same line?

Copy link
Member Author

Choose a reason for hiding this comment

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

copy/paste screwup, will update.

val = np.datetime64(1, "D")
result = DatetimeIndex([val], tz="US/Pacific")

expected = DatetimeIndex([val.astype("M8[s]")], tz="US/Pacific")
Copy link
Member

Choose a reason for hiding this comment

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

Is this actually what we expect? Any consideration to raising?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is correct. In 2.0 we support resolutions of "s", "ms", "us", and "ns", and when we get something that isn't one of those we cast to the closest supported reso

@@ -53,6 +53,12 @@


class TestSeriesConstructors:
def test_from_na_value_and_interval_of_datetime_dtype(self):
Copy link
Member

Choose a reason for hiding this comment

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

Need a whatsnew?

Copy link
Member Author

Choose a reason for hiding this comment

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

i dont think so. this just adds the test, the bug got fixed sometime previously

@mroeschke mroeschke added the Constructors Series/DataFrame/Index/pd.array Constructors label Nov 28, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM. Merge when ready @WillAyd

@WillAyd WillAyd merged commit c77aad2 into pandas-dev:main Nov 29, 2022
@WillAyd
Copy link
Member

WillAyd commented Nov 29, 2022

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bugs branch November 29, 2022 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors
Projects
None yet
3 participants