I have the following column in a dataframe:
columnA
EUR590
USD680
EUR10000,9
USD40
how can i split it based on the first three characters, that the dataframe looks like:
columnA columnB
590 EUR
680 USD
10000,9 EUR
40 USD
df['columnB']=df['columnA'].str.slice(stop=3)
df['columnA']=df['columnA'].str.slice(start=3)
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