I have a dataframe column that has a list within it. I need to remove the list so that it is a typical series.
Here is what I have:
import pandas as pd
df = pd.DataFrame({'columnA': [['try', 'go', 'spell'], ['you', 'should', 'to']], 'columnB': [['see', 'it', 'now'], ['why', 'not', 'yes']]})
Here is what I need:
df = pd.DataFrame({'columnA': (['try' " "'go' " " 'spell'], ['you' " " 'should' " " 'to']), 'columnB': (['see' " " 'it' " " 'now'], ['why' " " 'not' " " 'yes'])}
CodePudding user response: