Skip to content

Instantly share code, notes, and snippets.

@kusal1990
Created June 24, 2022 08:45
Show Gist options
  • Save kusal1990/4a60e418125ed11ed85d3f429e0010ce to your computer and use it in GitHub Desktop.
Save kusal1990/4a60e418125ed11ed85d3f429e0010ce to your computer and use it in GitHub Desktop.
easy_train_preds = []
easy_dev_preds = []
easy_test_preds = []
for i in range(len(df_easy_train)):
if '(1)' in df_easy_train['only_answers'].iloc[i]:
easy_train_preds.append(random.choice(num_list))
else:
if '(E)' in df_easy_train['only_answers'].iloc[i]:
easy_train_preds.append(random.choice(char_list_2))
else:
easy_train_preds.append(random.choice(char_list_1))
for i in range(len(df_easy_dev)):
if '(1)' in df_easy_dev['only_answers'].iloc[i]:
easy_dev_preds.append(random.choice(num_list))
else:
if '(E)' in df_easy_dev['only_answers'].iloc[i]:
easy_dev_preds.append(random.choice(char_list_2))
else:
easy_dev_preds.append(random.choice(char_list_1))
for i in range(len(df_easy_test)):
if '(1)' in df_easy_test['only_answers'].iloc[i]:
easy_test_preds.append(random.choice(num_list))
else:
if '(E)' in df_easy_test['only_answers'].iloc[i]:
easy_test_preds.append(random.choice(char_list_2))
else:
easy_test_preds.append(random.choice(char_list_1))
@kusal1990
Copy link
Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment