Skip to content
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

Change "nid" Casted Value in caliper_native_reader to np.int64 #118

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

michaelmckinsey1
Copy link
Collaborator

@michaelmckinsey1 michaelmckinsey1 commented Mar 10, 2024

Summary

While working with GraphFrame.to_hdf() I noticed that the pytables backend does not support the current datatype of the nid column, causing:

TypeError: objects of type ``IntegerArray`` are not supported in this context, sorry; supported objects are: NumPy array, record or scalar; homogeneous list or tuple, integer, float, complex or bytes

Most datatypes in Pandas columns get casted to Numpy datatypes . We needed to use pd.Int64Dtype() for time series data since np.int64 does not support NaN values. By casting the "nid" column to np.float64 instead of pd.Int64Dtype(), the issue is fixed with pytables and we can support NaN values for time series.

@michaelmckinsey1 michaelmckinsey1 added area-readers Issues and PRs involving Hatchet's data readers priority-normal Normal priority issues and PRs status-ready-for-review This PR is ready to be reviewed by assigned reviewers type-bug Identifies bugs in issues and identifies bug fixes in PRs labels Mar 13, 2024
@slabasan slabasan merged commit 5cccd40 into LLNL:develop Apr 8, 2024
3 checks passed
@michaelmckinsey1 michaelmckinsey1 deleted the fix-nid_cast branch April 9, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-readers Issues and PRs involving Hatchet's data readers priority-normal Normal priority issues and PRs status-ready-for-review This PR is ready to be reviewed by assigned reviewers type-bug Identifies bugs in issues and identifies bug fixes in PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants