I have a csv file which I am reading through pandas
Here's my code
import pandas as pd
df=pd.read_csv(filename.csv)
x=100*df['Country'].value_counts(normalize=True).to_frame()
print(x)
Here's my output
Country |
---|
US |
France |
Germany |
I want to save this output in a new column in the existing dataframe .How can I do that?