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

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

Open
yohplala opened this issue Nov 17, 2023 · 0 comments

Comments

@yohplala
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant