Is it possible to compare data with name, age,sex in pandas? and can we find nearest data after comparision?

By using logistic regression method we can compare the data with age, sex, name and using neighbour matching method we can find nearest data. but these methods are based on machine learning. I want to find and compare using python in same way. I want to know How accurate python compare to machine learning.

Source: Python Questions