deephaven / deephaven-docs-community

Source code for Community docs on the deephaven.io website.
Apache License 2.0
0 stars 5 forks source link

How to use InputColumn to create columns of types not covered in the factory functions (int_col, double_col, etc.) #178

Closed margaretkennedy closed 7 months ago

margaretkennedy commented 8 months ago

how to use InputColumn to create columns of types not covered in the factory functions (int_col, double_col, etc.)

import numpy as np

from deephaven import dtypes
from deephaven import new_table
from deephaven.column import InputColumn

np_arr = np.array([1, 2, 3], dtype=np.int32)
j_arr = dtypes.array(dtypes.int32, np_arr)
int_arr_col = InputColumn("IntArrCol", dtypes.int32_array, input_data=[j_arr])
t = new_table([int_arr_col])
elijahpetty commented 7 months ago

Outline: https://docs.google.com/document/d/14jnFPFDcmzGlmvxpjjA4MjKWRptAEJUSS-Yw6MJdYis/edit