データサイエンス100本ノックでSQLとPythonを勉強していきます。
S-009: 以下の処理において、出力結果を変えずにORをANDに書き換えよ。
select * from store where not (prefecture_cd = '13' or floor_area > 900)
SQLだと以下のようになります。
select * from store where prefecture_cd != '13' and floor_area <= 900
Pythonだと以下のようになります。
df_store.query('prefecture_cd != "13" & floor_area <= 900') [f:id:JunpeiNakasone:20220128070044p:plain]