Kaggle competition: Tweet Sentiment Extraction
from sklearn.linear_model import ElasticNetCV 
<train_on_grid>
predictions = json.load(open('/kaggle/working/predictions_.json', 'r'))
submission = pd.read_csv(open('/kaggle/input/tweet-sentiment-extraction/sample_submission.csv', 'r'))
for i in range(len(submission)) :
id_ = submission['textID'][i]
if test_df['sentiment'][i] == 'neutral':
submission.loc[i, 'selected_text'] = test_df['text'][i]
else:
submission.loc[i, 'selected_text'] = predictions[id_]
submission.to_csv('submission.csv', index=False )