xorbits
xorbits copied to clipboard
ENH: construct dataframe from series with different lengths
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
For a quick fix, we can support pd.concat
with different length series.