how to perform mean encoding in python