import pandas as pd
filename=pd.read_csv(‘iris.txt’)
testset=pd.DataFrame(filename)
newdata=[6.0,3.3,2.7,0.8]
di=list(((testset.iloc[:,0:4]-newdata)**2).sum(1)**0.5)
df=pd.DataFrame({‘list’:di,‘hua’:testset.iloc[:,4]})
dr=df.sort_values(by=‘list’)
print(dr.head(10))