vaex icon indicating copy to clipboard operation
vaex copied to clipboard

[FEATURE-REQUEST] Getting dtype of columns as they are when rendered in a pandas dataframe?

Open yohplala opened this issue 7 months ago • 0 comments

Description Hello, I would like to get the dtype of the columns as they are when the vaex dataframe is turned into a pandas dataframe. Basically, vaex is using its own dtype.

import vaex
df=vaex.from_items(("a",[1,2,3]),("b",[1.1, 2.1, 3.1]))
type(df.dtypes['a'])
Out[64]: vaex.datatype.DataType

But,

type(vf[:1].to_pandas_df().dtypes.to_dict()['a'])
Out[65]: numpy.dtype[int64]

Please, is there any way to get the result of the 2nd method without having vaex to compute a row? (in example above, I am making vaex computing the 1st row) If it is possible, I would like to prevent it, because I am using this information in a setup step.

Thanks for your help!

yohplala avatar Nov 17 '23 18:11 yohplala