Skip to content
Advertisement

convert list of tuples into single column of pandas dataframe?

I have a list of tuple like this :

JavaScript

I want to make data frame out this but just one column:

enter image description here

Currently using this

JavaScript

but then I have to join them again so operation cost is increased.

Thank you for your help

Advertisement

Answer

Convert list of tuples to Series:

JavaScript

For DataFrame add Series.to_frame:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement