私は以下のデータフレームを持っており、appleという列が見つかった場合は列のフルーツを検索し、すべての行を表示したいと考えています。pandasはデータフレーム列の値を検索します
Before :
number fruits purchase
0 apple yes
mango
banana
1 apple no
cheery
2 mango yes
banana
3 apple yes
orange
4 grapes no
pear
After:
number fruits purchase
0 apple yes
mango
banana
1 apple no
cheery
3 apple yes
orange
果物の列の種類はリストまたは文字列ですか? – Wen
果物の列型がオブジェクト – Sun