Skip to content

Conversation

fbourgey
Copy link
Contributor

@fbourgey fbourgey commented Feb 9, 2025

@WillAyd WillAyd added Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Feb 14, 2025
@fbourgey
Copy link
Contributor Author

@jbrockmendel, @WillAyd, could you please take a look?

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm - @jbrockmendel anything else on your end?

@mroeschke mroeschke requested a review from jbrockmendel May 16, 2025 15:55
@fbourgey
Copy link
Contributor Author

@jbrockmendel, I made the updates

Comment on lines 11356 to 11357
dtypes = [blk.dtype for blk in self._mgr.blocks]
if any(d.kind in "mM" for d in dtypes):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
dtypes = [blk.dtype for blk in self._mgr.blocks]
if any(d.kind in "mM" for d in dtypes):
if any(blk.dtype.kind in "mM" for blk in self._mgr.blocks):

@mroeschke mroeschke added this to the 3.0 milestone May 22, 2025
],
}
)
arr = np.array(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
arr = np.array(
expected = np.array(

[np.nan, 8.64e04, 2.00e00],
]
)
assert np.allclose(df.to_numpy(float, na_value=np.nan), arr, equal_nan=True)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert np.allclose(df.to_numpy(float, na_value=np.nan), arr, equal_nan=True)
result = df.to_numpy(float, na_value=np.nan),
tm.assert_numpy_array_equal(result, expected)

@mroeschke mroeschke merged commit cfe54bd into pandas-dev:main May 23, 2025
43 of 44 checks passed
@mroeschke
Copy link
Member

Thanks @fbourgey

@fbourgey fbourgey deleted the bug-cov-nat branch May 23, 2025 17:43
@TomAugspurger
Copy link
Contributor

@fbourgey could you make a follow up PR adding release notes to the 3.0 whatsnew? I think this is being called a bug fix, and not an API breaking change?

@fbourgey
Copy link
Contributor Author

fbourgey commented Jun 6, 2025

@TomAugspurger

#61586

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

Labels

Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: cov buggy when having NaT in column

5 participants