質問するログイン新規登録

回答編集履歴

1

Edit

2018/01/11 03:47

投稿

mkgrei
mkgrei

スコア8562

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