I have dataframe like one below
df = pd.DataFrame({'vals': [1, 2, 3, 4, 5], 'ids': [u'a iball is', u'aaa vcat ll', u'c cnut bb', u'fdfdf qbell l', 'bxyz zbat c']})
I am trying to replace the the first string of characters between the first and second space position with x in ids column
I want my data frame to look some thing like this
df = pd.DataFrame({'vals': [1, 2, 3, 4, 5], 'ids': [u'a xball is', u'aaa xcat ll', u'c xnut bb', u'fdfdf xbell l', 'bxyz xbat c']})