Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active June 8, 2020 09:37
Show Gist options
  • Save aniruddha27/03345faa5f83b6110dc0515b17a148a2 to your computer and use it in GitHub Desktop.
Save aniruddha27/03345faa5f83b6110dc0515b17a148a2 to your computer and use it in GitHub Desktop.
# create a df containing sentence and its output for rule 3
row_list = []
for i in range(len(df3)):
sent = df3.loc[i,'Sent']
year = df3.loc[i,'Year']
# rule
output = rule3(sent)
dict1 = {'Year':year,'Sent':sent,'Output':output}
row_list.append(dict1)
df_rule3 = pd.DataFrame(row_list)
# output percentage for rule 3
output_per(df_rule3,'Output')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment