나를 찾아가는 길

[Python] for if comprehension 본문

Python/공부-ing

[Python] for if comprehension

ari950505 2022. 3. 27. 00:28
# for+if+else comprehension 
# y, y_pred 가 같으면 'True' 값 입력
df_concat['match'] = [ 'True' if df_concat.labels[i] == df_concat.label_answer[i] else 'False' for i in range(len(df_concat))]
Comments