xorbits icon indicating copy to clipboard operation
xorbits copied to clipboard

ENH: construct dataframe from series with different lengths

Open UranusSeven opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe

Allow constructing a dataframe from series with different lengths:

s1 = pd.Series([1, 2, 3])
s2 = pd.Series([1, 2, 3, 4])
pd.DataFrame([s1, s2])

Current in Xorbits, you got:

ValueError: all input tensors must have the same shape

But in pandas, you got:

     0    1    2    3
0  1.0  2.0  3.0  NaN
1  1.0  2.0  3.0  4.0

UranusSeven avatar Mar 22 '23 07:03 UranusSeven

For a quick fix, we can support pd.concat with different length series.

aresnow1 avatar Mar 23 '23 04:03 aresnow1