回答編集履歴
1
Edit
answer
CHANGED
@@ -3,4 +3,7 @@
|
|
3
3
|
dfa.loc[dfa['Date']==s1, ‘SuperBowl’] = 1
|
4
4
|
dfa.loc[dfa['Date']==s2, ‘SuperBowl’] = 1
|
5
5
|
dfa.loc[dfa['Date']==s3, ‘SuperBowl’] = 1
|
6
|
-
```
|
6
|
+
```
|
7
|
+
|
8
|
+
条件式はisinで一気に評価できます。
|
9
|
+
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.isin.html
|