There is a dataset with three columns:
- Col 1 : Name_of_Village
- Col 2: Average_monthly_savings
- Col 3: networth_in_dollars
So, I want to create a dictionary "Vill_corr" where the key values are the name of the villages and the associated values are the correlation co-effient between Col2 & Col3 using Pandas.
I am aware of methods of calculating the correlation co-efficients, but not sure how to store it against each Village name key,
corr = df["Col2"].corr(df["Col3"])
Please help.