makexu93
4/7/2019 - 5:01 PM

Extract Substring from Text using split() in Python

Extract Substring from Text using split() in Python. Extract only month and day from column First_updated.

mydata['First_updated2'] = mydata['First_updated'].str.split(pat=",",expand=True)[0]