Pandas value_counts() returns non unique values
问题 I have a dataframe of surgical activity data that has 58 columns and 200,000 records. One of the columns is treatment specialty. Each row corresponds to a patient encounter. I want to see the relative conribution of medical specialties.One column is 'treatment_specialty'. I have used df['treatment_specialty'].value_counts(normalize=true) to get the relative proprtions of each specialty. This below is returned (no errors). The specialties have codes eg 150 is neurosurgery. df.head() 150 0