0

I have a data set that includes patients and medical analysis data about them. One of my features is showing that what kind of analysis has been done on patient and there is 129 unique values. Also, there is a date column and result of the analysis column at the same time. You can see my data set below.


    DATE      ANALYSIS     RESULT

04/06/2020     D-Dímero     863       
04/06/2020     RDW              13.0          
04/06/2020         Sódio        134       
04/06/2020       Eosinófilos        1.3       
04/06/2020   Uréia              24

In that point, all the data I show you above is belong to a patient. What I want to do is, taking all the "ANALYSIS" row values and convert them into a column value. At the same time, creating an another column that shows the result of the spesific analysis(for example, "sodio_result" column for the sodio analysis). But as you see, dates are the same. What I exactly want to do is taking one patient's data and show them in only one row.

Also, there is my expected output for the first row of my example data:

DATE        D-DİMERO_RESULT  Sodio_ANALYSIS   RDW_ANALYSIS
04/06/2020      863                134            13.0

0 Answers0