mercredi 22 juillet 2020

How best number of line for below code can be reduced

I am new to coding, is there a way to reduce number of lines ? Can same thing be done with a data frame if yes how ?

if n_ep >= 200 :
    te_crit=0.379
elif n_ep >=100:
    te_crit=0.376
elif n_ep >=50:
    te_crit=0.374
else:te_crit=0.371

Keen to understand different methods , even though it does not have huge impact on the processing of my application

Aucun commentaire:

Enregistrer un commentaire