Forget what you did and where you go the code to do it.

What do you have now and what do you want to have.

I get that you have a mess of CSV files, but that's all I got.