I split a column with multiple underscores but now I am looking to remove the first index from that array... The element at the first index changes names as you go down the rows so can't remove based on any value..
Column
abc1_food_1_3
abc2_drink_2_6
abc4_2
split(df.Column, '_').alias('Split_Column')
Split_Column
[abc1, food, 1, 3]
[abc2, drink, 2, 6]
[abc4, 2]
now how can I yield:
Split_Column
[food, 1, 3]
[drink, 2, 6]
[2]
I will be converting the array column back to a string with underscores afterwards.. (concat_ws I believe?)