Pandas beginner here. I have a .CSV file that I have opened using Pandas. The format of the file is follows:-
PatientId x y width height target
A12kxk 23 45 10 20 1
Aldkd2 92 22 12 30 1
Aldkd2 29 11 98 34 1
Alll34 0
I want to get a dictionary with the PatientId as key and the value would be an 2D array containing the x, y, width, height of one row of one patient row-wise and the various rows stacked down like this:-
Dictionary["Aldkd2"] = 92 22 12 30 29 11 98 34
I want to discard those which have 0 in target. There are one or more rows in the table for a single patientId. How can I do this?