1# You can pass the list with original column names to get_feature_names:
2encoder.get_feature_names(['Sex', 'AgeGroup'])
3
4# output
5# ['Sex_female', 'Sex_male', 'AgeGroup_0', 'AgeGroup_15',
6# 'AgeGroup_30', 'AgeGroup_45', 'AgeGroup_60', 'AgeGroup_75']