Python Remove Text After Substring Function In R Studio