Javatpoint Logo
Javatpoint Logo

Pandas Series.to_frame()

Series is defined as a type of list that can hold an integer, string, double values, etc. It returns an object in the form of a list that has an index starting from 0 to n where n represents the length of values in Series.

The main difference between Series and Data Frame is that Series can only contain a single list with a particular index, whereas the DataFrame is a combination of more than one series that can analyze the data.

The Pandas Series.to_frame() function is used to convert the series object to the DataFrame.



name: Refers to the object. Its Default value is None. If it has one value, the passed name will be substituted for the series name.


It returns DataFrame representation of Series.



0          a
1          b
2          c



      Emp       ID
0   Parker     102
1   John        107
2   Smith      109
3   William   114

Next TopicSeries.unique()

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA