Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork18.5k
Bug cov nat#60898
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Bug cov nat#60898
Conversation
fbourgey commentedFeb 9, 2025
- closesBUG: cov buggy when having NaT in column #53115
Uh oh!
There was an error while loading.Please reload this page.
@jbrockmendel,@WillAyd, could you please take a look? |
There was a problem hiding this 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?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@jbrockmendel, I made the updates |
pandas/core/frame.py Outdated
dtypes = [blk.dtype for blk in self._mgr.blocks] | ||
if any(d.kind in "mM" for d in dtypes): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
dtypes= [blk.dtypeforblkinself._mgr.blocks] | |
ifany(d.kindin"mM"fordindtypes): | |
ifany(blk.dtype.kindin"mM"forblkinself._mgr.blocks): |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
], | ||
} | ||
) | ||
arr = np.array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
assertnp.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) |
cfe54bd
intopandas-dev:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@fbourgey |