'Split a specific cell in dataframe into a list of values
I'm trying to get cell values from Excel using pandas. In some cases there are multiple values in one cell.
How can I separate them into different values?
row = str(df_sheet.loc[df_sheet["customer_id"] == customer, "allergies_code"])
customer_allergies = row.values
For 113,115,121 I am getting the output 113115121.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
