I like to show the value_counts(normalize=True) of a series what works well, but I also wanna show the value_counts() not normalized in an additional column.
Code
import pandas as pd
cars = {'Brand': ['Honda Civic','Toyota Corolla','','Audi A4'],
'Price': [32000,35000,37000,45000]
}
df = pd.DataFrame(cars, columns = ['Brand', 'Price'])
df.Brand.value_counts(normalize=True)
Expected output
perc count
Toyota Corolla 0.25 1
Audi A4 0.25 1
Honda Civic 0.25 1
0.25 1
Name: Brand, dtype: float64
Question
How could I attache both information to the series?