Sure. I apologize for any confusion. I will just make up these strings to simplify it, but the structure is the same as my data set. Basically, I need the first four "cells" and the last "cell" of each line but the position of the last cell varies. Thank you for any help.
Input (via csv file):
Name1, year1, day1, amount1.1, amount1.2, amount1.3}
Name1, year1, day2, amount2.1, amount2.2, amount2.3}
Name2, year1, day1, amount1.1, amount1.2, amount1.3, amount1.4}
Name2, year1, day2, amount2.1, amount2.2, amount2.3, amount2.4}
Name3, year1, day1, amount1.1, amount1.2, amount1.3}
Name3, year1, day2, amount2.1, amount2.2}
Output (via csv file):
Name1, year1, day1, amount1.1, amount1.3}
Name1, year1, day2, amount2.1, amount2.3}
Name2, year1, day1, amount1.1, amount1.4}
Name2, year1, day2, amount2.1, amount2.4}
Name3, year1, day1, amount1.1, amount1.3}
Name3, year1, day2, amount2.1, amount2.2}