I have a column in a dataframe which has uuids attached with some other file info:
ff8738hjgdj792__somevar1.txt
9jldh93k4043ik__some3var.txt
I would like to sort the dataframe based on the first uuid field (till the double underscores) and ignore the other attached string to sort?
At the moment I do:
df.sort_values(by='df_column_name')
but this is not yielding the desired result because pd is taking the entire string into account.
How do I go about achieving this with pandas?