I am new to python. I have a pandas dataframe as follows (with 4 columns) in Python version 3.7.4:
df = pd.DataFrame({'Patient_Key': [2333836, 2319735],
'DX1': ["N184", 'Z6827'],
'DX2': ['D649', 'N184'],
'DX3': ['E785', 'I10']})
Patient_Key DX1 DX2 DX3
0 2333836 N184 D649 E785
1 2319735 Z6827 N184 I10
How to we convert this to a new dataframe with only 2 columns?
-- Expected Conversion
2333836, ["N184", "D649", "E785"]
2319735, ["Z6827", "N184", "I10"]