Series.
to_frame
Convert Series to DataFrame.
The passed name should substitute for the series name (if it has one).
DataFrame representation of Series.
Examples
>>> s = ps.Series(["a", "b", "c"]) >>> s.to_frame() 0 0 a 1 b 2 c
>>> s = ps.Series(["a", "b", "c"], name="vals") >>> s.to_frame() vals 0 a 1 b 2 c