We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is similar to what was done in R's %in% in #15929
%in%
The goal is to enable subsetting via frame[(frame[column].isin(values)), :] as it was before the AstMatch behavior changed.
frame[(frame[column].isin(values)), :]
Test:
import os import sys sys.path.insert(1, os.path.join("..", "..", "..")) import h2o from tests import pyunit_utils def test_isin_issue(): frame = h2o.upload_file(pyunit_utils.locate("smalldata/titanic/titanic_expanded.csv")) column = "cabin" levels = frame[column].levels()[0][:-10] assert len(levels) > 10 print(frame[column].isin(levels).unique()) # expecting a binary vector as in pandas assert frame[column].isin(levels).unique().nrows == 2 assert frame.as_data_frame(use_pandas=True)[column].isin(levels).nunique() == 2 pyunit_utils.run_tests([test_isin_issue])
The text was updated successfully, but these errors were encountered:
maurever
No branches or pull requests
This is similar to what was done in R's
%in%
in #15929The goal is to enable subsetting via
frame[(frame[column].isin(values)), :]
as it was before the AstMatch behavior changed.Test:
The text was updated successfully, but these errors were encountered: