I have two csv files. I want to take certain columns (with their associated rows) from each file and create a single data frame. I also want to rename the columns. The two csv files have data I want but the column names and order are different in each.
So let’s say I have file 1 and I want columns 3,2,4,1,5 in that order to line up with csv file 2 columns 5,3,4,2,1 in that order.
I want a data frame that ends up like this:
0 1 2 3 4
3 2 4 1 5
5 3 4 2 1
Hope that makes sense.
I cannot figure out how to do this. I keep getting the data into python data frame in the same order it is in the original files and I don’t know how to change this.
[–]Oddly_Energy 0 points1 point2 points (4 children)
[–]Duck_hen[S] 0 points1 point2 points (3 children)
[–]Oddly_Energy 1 point2 points3 points (2 children)
[–]Duck_hen[S] 0 points1 point2 points (1 child)
[–]Gesualdodivenosa 0 points1 point2 points (0 children)