I have a series object of strings where there is a specific characters i can go along with. For instance, the one with the end character of []
will be corresponded to those with end character of ()
s = pd.Series(['September[jk]', 'firember hfh(start)','secmber(end)','Last day(hjh)',
'October[jk]','firober fhfh (start)','thber(marg)','lasber(sth)',
'December[jk]','anober(start)','secber(start)','Another(hkjl)'])
I can simply clean the data but these characters at the end should help me build the resulting data frame like this
0 September firember hfh
1 September secmber
2 September Last day
3 October firober fhfh
4 October thber
5 October lasber
6 December anober
7 December secber
8 December Another