I'm trying to take x number of columns from an existing df and convert them into a dictionary.
My questions are:
The method shown below is considered a good practice? I think it's repetitive and I'm sure it can be a more elegant code.
Should I convert from df to dictionary if my idea is to build a plot? Or it's an unnecessary step?
I've tried the code below:
familiarity_dic = familiarity[{'Question':'Question','SCORE':'SCORE'}]
familiarity_dic
Expected result is correct but I want to know if it's the best practice for Pandas.
Question SCORE 36 Invesco 100 35 Schroders 96 34 Fidelity 96 31 M&G 95 0 BlackRock 95