extract first word from string in column into a list in python

Solutions on MaxInterview for extract first word from string in column into a list in python by the best coders in the world

showing results for - "extract first word from string in column into a list in python"
Blair
04 Apr 2017
1# Split a phrase in all rows of a column and make a list of the first word
2
3list_data = [dataset_name.column_name.str.split(' ')[index][0]
4             for index in range(0, len(dataset_name))]
5print(list_data)