Answers for "value_count pandas change column name"

0

value_count pandas change column name

df = df.value_counts().rename_axis('unique_values').reset_index(name='counts')
print (df)
   unique_values  counts
0              2       3
1              1       2
Posted by: Guest on October-30-2021

Code answers related to "value_count pandas change column name"

Python Answers by Framework

Browse Popular Code Answers by Language