1
$\begingroup$

I have about 8000 configurations in an excel sheet. each configuration has four scores as seen in the image below. I would like to choose the best solution that has the highest lighting level score, lowest energy consumption score, the highest visual comfort score, the highest thermal comfort score, and the lowest CO2 level score. I'm new to data science but familiar with Python. I'm hoping that someone who is kind enough to explain a possible solution to rank these configurations from best to worst. Also, I'm interested to know the mathematical algorithm behind of the possible ranking system. enter image description here

$\endgroup$
3
$\begingroup$

I have not executed the below code but I would do something like this,

df.loc[(df['Lighting Levela (Max)'] == max(df['Lighting Levela (Max)']) &
       (df['Energy Consumption (Min)'] == min(df['Energy Consumption (Max)']) &
       (df['Visual Comfort (Max)'] == max(df['Visual Comfort (Max)']) &
       (df['Thermal Comfort (Max)'] == max(df['Thermal Comfort (Max)']) &
       (df['CO2 levels (Min)'] == min(df['CO2 levels (Max)']), :)
$\endgroup$
3
  • $\begingroup$ Do you know the mathematical algorithm behind Pandas Max and Min in the df.loc function? $\endgroup$
    – Julia_arch
    Jul 9 '20 at 3:55
  • $\begingroup$ Is it as simple as it starts ranking one column at a time, because I'm looking for a further ranking system that perhaps gives a weighted ranking score to each variable $\endgroup$
    – Julia_arch
    Jul 9 '20 at 4:08
  • 1
    $\begingroup$ I dont think I understood weighted ranking score for each variable if possible please elaborate but ` max(df['Lighting Levela (Max)'])` will just give the max value in the 'Lighting Levela (Max)' column. $\endgroup$ Jul 9 '20 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.