xorbits.pandas.Series.to_frame#

Series.to_frame(name=None)[源代码]#

Convert Series to DataFrame.

参数

name (object, optional) – The passed name should substitute for the series name (if it has one).

返回

DataFrame representation of Series.

返回类型

DataFrame

实际案例

>>> s = pd.Series(["a", "b", "c"],  
...               name="vals")
>>> s.to_frame()  
  vals
0    a
1    b
2    c

This docstring was copied from pandas.core.series.Series.