Ordering a material science dataset (properties names, properties scalars, formulas)
Given that your Dataframe is:
df2 = pd.DataFrame({
    &quot;Chemical_Formula&quot;:[&quot;He&quot;, &quot;NO_2&quot;, &quot;CuO3&quot;, &quot;CuO3&quot;, &quot;He&quot;, &quot;NO2&quot;],
    &quot;Property_name&quot;:[&quot;Electrical conduc.&quot;, &quot;Resistance&quot;, &quot;Hardness&quot;, &quot;Fluorescence&quot;, &quot;Toxicity&quot;, &quot;Hardness&quot;],
    &quot;Property_Scalar&quot;:[1, 50, 10, 300, 39, 80]
})






Chemical_Formula
Property_name
Property_Scalar




0
He
Electrical conduc.
1


1
NO_2
Resistance
50


2
CuO3
Hardness
10


3
CuO3
Fluorescence
300


4
He
Toxicity
39


5
NO2
Hardness
80




You can use pivot to &quot;unmelt&quot; this in a wide format
df3 = df2.pivot(index=&quot;Chemical_Formula&quot;, columns=&quot;Property_name&quot;)





Chemical_Formula
('Property_Scalar', 'Electrical conduc.')
('Property_Scalar', 'Fluorescence')
('Property_Scalar', 'Hardness')
('Property_Scalar', 'Resistance')
('Property_Scalar', 'Toxicity')




CuO3
nan
300
10
nan
nan


He
1
nan
nan
nan
39


NO2
nan
nan
80
nan
nan


NO_2
nan
nan
nan
50
nan




From then on you can drop columns you don't need and plot them.