Skip to content
Advertisement

Create list from columns and add column to dataframe python

I have this dataframe:

enter image description here

and I would like to create col_list and add it to the dataframe such that it looks like this:

enter image description here

I have tried this code but it doesn’t work:

JavaScript

Advertisement

Answer

Try this

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