I have a DataFrame with a column keyboardInfo containing strings as follows
keyboardInfo
[alphabet de_CH:swiss 1080x667 text actionNone isMultiLine]
[alphabet de_CH:swiss 1080x667 text actionNone isMultiLine]
[alphabetAutomaticShifted de_CH:swiss 1080x667 text actionNone isMultiLine]
[alphabet de_CH:swiss 720x440 text actionNone isMultiLine]
The DataFrame is pretty big (around 5'000'000 rows). The third entry of each string (after the second white space) is always the width x height (but in total the string can contain different amounts of elements, that means it should be counted from the left). Now, I would like to add two additional columns to the DataFrame containing the width and height (as integers). The results should look as follows (the DataFrame contains also other columns which I droped here):
keyboardInfo width height
[alphabet de_CH:swiss 1080x667 text actionNone isMultiLine] 1080 667
[alphabet de_CH:swiss 1080x667 text actionNone isMultiLine] 1080 667
[alphabetAutomaticShifted de_CH:swiss 1080x667 text actionNone isMultiLine] 1080 667
[alphabet de_CH:swiss 720x440 text actionNone isMultiLine] 720 440
How can this be done efficiently?