pandas.Series.to_frame
pandas 3.1.1 · Series and accessors · method
Turn a one-dimensional pandas object into a DataFrame.
Call syntax
Series.to_frame(name=…)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
name |
Optional Positional or keyword |
object Set a name or identify the named object used by the operation. |
Returns
DataFrame