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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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)