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

Python H2OFrame construction for Scipy sparse matrices ignores 'column_names' param #15946

Open
sebhrusen opened this issue Nov 22, 2023 · 0 comments

Comments

@sebhrusen
Copy link
Contributor

When importing a scipy sparse matrix to H2O using the H2OFrame constructor, the column_names param is ignored and columns are named using the default C1, C2, ... convention.

discovered when writing tests for #15898
see test h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame.py

Current behaviour

In [11]: from scipy.sparse import csr_matrix, csc_matrix
    ...: h2o.H2OFrame(csr_matrix([[1, 0, 0],[0, 1, 0],[0, 0, 1]]), column_names=['x', 'y', 'z'])
Parse progress: |████████████████████████████████████████████████████████████████████████████████████ (done)| 100%
Out[11]:
  C1    C2    C3
----  ----  ----
   1     0     0
   0     1     0
   0     0     1
[3 rows x 3 columns]

Expected result

Out[11]:
   x     y     z
----  ----  ----
   1     0     0
   0     1     0
   0     0     1
[3 rows x 3 columns]
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