Open liufeimath opened 1 month ago
thanks for the report
I think I agree - pl.from_pandas
is overloaded to return DataFrame | Series
depending on the input type
We prefer a Series over a Dataframe, but we are not 100% sure how yet.
There are a few options.
Dataframe Constructor | Series Constructor |
---|---|
pl.Dataframe.from_numpy | pl.Series.from_numpy |
pl.from_numpy(arr, schema=...) | pl.from_numpy |
pl.Dataframe(arr) | pl.from_numpy |
Description
Currently it returns a
n x 1 DataFrame
. This causes inconsistencies. E.g.