deephaven / deephaven-core

Deephaven Community Core
Other
257 stars 80 forks source link

Pandas DataFrame string column gets converted to PyObject column with `to_table` #4163

Closed jjbrosnan closed 1 year ago

jjbrosnan commented 1 year ago

Description

If a user converts a Pandas DataFrame with a string column to a table with deephaven.pandas.to_table, the resultant column in the Deephaven table is of type org.jpy.PyObject instead of String.

Steps to reproduce

  1. Create a DataFrame with a single string column:
import pandas as pd

df = pd.DataFrame({"Col1": ["A", "B", "C"]})
  1. Convert it to Deephaven with to_table
from deephaven.pandas import to_table

t = to_table(df)
  1. Hover over Col1 in the table or use meta_table to see the column type:
t_meta = t.meta_table

The type of Col1 is org.jpy.PyObject when it should be String.

Expected results

A String column.

Actual results

A PyObject column.

Additional details and attachments

If applicable, add any additional screenshots, logs, or other attachments to help explain your problem.

Versions

jjbrosnan commented 1 year ago

After speaking w/ Jianfeng, this is not a bug. I will be closing this ticket.