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

When data type are int vs real in the h2o python client , if invoke summary before running rbind get error #8446

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 3 comments

Comments

@exalate-issue-sync
Copy link

this works -

{code:java}df = h2o.H2OFrame([1, 2, 5.5], destination_frame="df")
df1 = df[3, :]
df2 = df[:2, :]
df1.rbind(df2){code}

this fails

{code:java}df = h2o.H2OFrame([1, 2, 5.5], destination_frame="df")
df1 = df[3, :]
df2 = df[:2, :]
summary = df1.summary(return_data=True)
df1.rbind(df2) # Error because of different data types

H2OValueError Traceback (most recent call last)
in
----> 1 df1.rbind(df2) # Error because of different data types

/usr/local/lib/python3.7/site-packages/h2o/frame.py in rbind(self, data)
2635 "the columns must match" % (frame.ncol, self.ncol))
2636 if frame.columns != self.columns or frame.types != self.types:
-> 2637 raise H2OValueError("Column names and types must match for rbind() to work")
2638 fr = H2OFrame._expr(expr=ExprNode("rbind", self, *frames), cache=self._ex._cache)
2639 fr._ex._cache.nrows = self.nrow + sum(frame.nrow for frame in frames)

H2OValueError: Column names and types must match for rbind() to work
{code}

@exalate-issue-sync
Copy link
Author

Wendy commented: I changed the column type check in frame.py. If the column types belong to [“real” “int”], rbind will proceed.

@exalate-issue-sync
Copy link
Author

Nidhi Mehta commented: pr - [https://github.com//pull/4249|https://github.com//pull/4249|smart-link]

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Migration Info

Jira Issue: PUBDEV-7186
Assignee: Wendy
Reporter: Nidhi Mehta
State: Resolved
Fix Version: 3.28.0.3
Attachments: Available (Count: 1)
Development PRs: Available

Linked PRs from JIRA

#4249

Attachments From Jira

Attachment Name: Screen Shot 2020-01-07 at 12.02.48 PM.png
Attached By: Nidhi Mehta
File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-7186/Screen Shot 2020-01-07 at 12.02.48 PM.png

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

No branches or pull requests

1 participant