Created
June 24, 2022 07:39
-
-
Save kusal1990/239fcd0554ff93de433afd4b66a527f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_question(question): | |
''' | |
This function will take a value in question column then, will split the string | |
at (A) or (1). After splitting we will take only first part which is the question. | |
''' | |
if '(A)' in question: | |
x = question.split('(A)')[0] | |
elif '(1)' in question: | |
x = question.split('(1)')[0] | |
return x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok