df =df.value_counts().rename_axis('unique_values').reset_index(name='counts')
详见:https://stackoverflow.com/questions/47136436/python-pandas-convert-value-counts-output-to-dataframe
df =df.value_counts().rename_axis('unique_values').reset_index(name='counts')
详见:https://stackoverflow.com/questions/47136436/python-pandas-convert-value-counts-output-to-dataframe