I have a list of zipcodes that i want to extract from a geopandas dataframe. I am successfully able to detect the rows with the list of zipcodes (rfp) but are unable to create new geopandas DataFrame with just the new rows copied over.
I tried append, iloc
Is there a simpler way to get this done?
i =0
while i < len(rfp):
for index, row in countries.iterrows():
if rfp[i] == row['CFSAUID']:
#print(index, row)
print(index, row['CFSAUID'], countries.iloc[index])
#data=data.append[countries.iloc[index]]
#print(rfp[i])
i = i + 1
data.head()

