Question: I'm using Python3 to read a column from an Excel spreadsheet:

```
import pandas as pd
from pandas import ExcelFile
df = pd.read_excel('MWE.xlsx', sheet_name='Sheet1')
print(df)

                   col1                        col2
0         starts normal                  egg, bacon
1  still none the wiser         egg, sausage, bacon
2      maybe odd tastes                   egg, spam
3     or maybe post-war            egg, bacon, spam
4  maybe for the hungry   egg, bacon, sausage, spam
5                 bingo  spam, bacon, sausage, spam

```

I want to reduce `col2` to a single list of the words in col2 (e.g. egg, bacon,...).

`df.col2.ravel()` seems to reduce `col2` to a list of strings.

`df.col2.flatten()` yields

```
AttributeError: 'Series' object has no attribute 'flatten' 

```

Answer: 
If what you want is to have a Series of list as the col2, this will do the trick:

```
df = pd.DataFrame({'col1': ['starts normal','still none the wiser'], 'col2': ['egg, bacon','egg, sausage, bacon']})

df['col2'] = df['col2'].map(lambda x: [i.strip() for i in x.split(',')])
print(df)

```

Result:

```
                   col1                   col2
0         starts normal           [egg, bacon]
1  still none the wiser  [egg, sausage, bacon]

```
Try something simple like:

```
df = pd.DataFrame({'col2': [list('abc'), list('de'), list('fghi')]})
flat_col2 = [element for row in df.col2 for element in row]
# ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']

```