koalas
koalas copied to clipboard
DataFrame.reindex does not support named columns index
Hi, it seems currently not possible to reindex a DataFrame with a named columns Index, the new name is missing.
>>> pdf = pd.DataFrame({"values": [1, 2, 3]})
>>> pdf
values
0 1
1 2
2 3
>>> kdf = ks.from_pandas(pdf)
>>> columns = pd.Index(["values"], name="name")
>>> kdf.reindex(columns=columns)
values
0 1
1 2
2 3
But in pandas :
>>> pdf.reindex(columns=columns)
name values
0 1
1 2
2 3
I will submit a PR for this.