I m trying to split on ||
ser=pd.Series(['there a guy || I will have a bite || no can do','I can do || more'])
ser.str.split('||')
**I should get output as [['there a guy','I will have a bite','no can do'],['I can do','more']] but I m getting this
0 [, t, h, e, r, e, s, , a, , g, u, y, , |, |...
1 [, I, , c, a, n, , d, o, , |, |, , m, o, r...
dtype: object
Double || is processing like regex, so need escape this values by \:
a = ser.str.split('\|\|')
print (a)
0 [there a guy , I will have a bite , no can do]
1 [I can do , more]
dtype: object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With