Encode user input to match encoded data frame

14 Views Asked by At

I am trying to encode a user's input to match the encoded dataframe i have created beforehand. However, i am unsure on how to do so.

dataframe with the label encoded columns:

cdata =pd.DataFrame({'ServiceItemName':ServiceItemName, 'OpticalDiagnosisCode':OpticalDiagnosisCode, 'Frequency': Frequency, 'Description': Description})

cdata

Image of cdata

example of user input (ServiceItemName, Frequency, and Description)

test_input1 = ['SYSTANE ULTRA', '4 HOURLY / BOTH EYES', 'LE']
0

There are 0 best solutions below