dask.dataframe.Series.to_frame

dask.dataframe.Series.to_frame

Series.to_frame(name=None)[source]

Convert Series to DataFrame.

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

Some inconsistencies with the Dask version may exist.

Parameters
nameobject, optional

The passed name should substitute for the series name (if it has one).

Returns
DataFrame

DataFrame representation of Series.

Examples

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