Skip to content
Advertisement

Split Series of tuples into multiple columns

I have a series of tuples of the form ('Name', Number), and I would like to split them into two columns, one being the name, the other being the number.

I’d like to end up with something like this:

JavaScript

I’ve tried a few iterations of splitting strings, applying a lambda function, etc, and can’t seem to get this simple process right.

Advertisement

Answer

Construct a new dataframe and assign back to dataframe

sample df:

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