标签: python pandas
import pandas as pd import numpy as np df = pd.DataFrame( { 'Country' : ['USA','Canada','Mexico'], 'City' : ['Houston','Ottawa','Leon'], 'Capital' : ['N','Y','N'] } ) df.where(df.Capital =='Y')
如何只获得满足条件的行?