-1
Hello. I need to find a way to standardize the following classes in python
db.groupby(["EdLevel"])["EdLevel"].count()
Master's degree 11141
Master's degree (M.A., M.S., M.Eng., MBA, etc.) 13112
Master's degree (MA, MS, M.Eng., MBA, etc.) 19569
Master's degree (MA, MS, M.Eng., MBA, etc.) 21396
And the code would need to summarize everything to "Master’s Degree"
I’m new to programming, and I’m totally lost. I thought of using a replace, but there are dozens of different classes, but they all follow the same pattern: "Educational level" + "(other graduations)" If I can remove everything that is after the "(" I could decrease my code
Thanks for your help
If one of the answers below solved your problem and there was no doubt left, choose the one you liked the most and mark it as correct/accepted by clicking on the " " that is next to it, which also marks your question as solved. If you still have any questions or would like further clarification, feel free to comment.
– Lucas