I have a CSV file that looks like below with columns labeled below data, and I'm have trouble trying to retrieve said data with pandas. I'm only able to address the columns at the top with the specific rows within that parameter with using df["crit_rating"][0:3]
, however i'm unable to use df["agility]
to address as a seperate column. Is there a way to do this without having the make another CSV file or reformatting the file?
crit_rating, DPS, DPS-Error
-1250, 4439.51, 11.2203
-1225, 4438.28, 11.3488
-1200, 4439.3, 11.2504
-1175, 4442.01, 13.0366
agility, cDPS, cDPS-Error
-1250, 1400.14, 3.62795
-1225, 1473.09, 4.28675
-1200, 1547.47, 4.47641
-1175, 1620.25, 4.63525
Where I'd like it to be:
agility, DPS, DPS-Error, crit_rating, cDPS, cDPS-Error
-1250, 1400.14, 3.62795, -1250, 4439.51, 11.2203
-1225, 1473.09, 4.28675, -1225, 4438.28, 11.3488
-1200, 1547.47, 4.47641, -1200, 4439.3, 11.2504
-1175, 1620.25, 4.63525, -1175, 4442.01, 13.0366
crit_rating
column I would expect that doing the same foragility
should also work. $\endgroup$