Problem in Creating DataFrame in 2D array #1452
Unanswered
dharik-arsath
asked this question in
Q&A
Replies: 1 comment
-
Vaex is a column oriented dataframe. You gave it two columns, so it has two columns. Adding matrices is currently not officially supported. That might change in the future, but i don't expect it to be soon. For now what you can do is simply: df = vaex.from_arrays(**{f'col{i}': x[:, i] for i in range(x.shape[1])}, y=y) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a 2D array with input and output and If I use vaex.from_arrays((x=x,y=y)) it gives me only 2 columns with x being array itself in vaex dataframe
eg:
from sklearn.datasets import make_classification
x,y = make_classification(10)
x.shape -> 10 rows and 20 columns
vaex.from_arrays(x=x,y=y)
output_expected as columns being 0 1 2 3 ..... upto 19
but the output I got:
only x and y with x being array in dataframe
Beta Was this translation helpful? Give feedback.
All reactions