Split from right to left

Hi,

I’m trying to split the Ticket column of the Titanic dataset on Kaggle (Titanic - Machine Learning from Disaster | Kaggle) which looks something like this:

A/5 21171
PC 17599
STON/O2. 3101282
113803
373450
SC/AH Basle 541

into Ticket Prefix and Ticket Number. If I do a normal split by ’ ’ I get mixed Prefixes and Numbers in the left column… If I could either split by ’ ’ from right to left or revert the strings first, then make a normal split and revert back it would be solved. The thing is, that I don’t know how to do this on Knime. Do I need to import my Python code or is there a solution in Knime to do this?

Thanks in advance!

You can use String Manipulation node with reverse() function then resort columns.

1 Like

Great, works. Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.