Pregunta de entrevista de Pretium

python dataframe weighted average, some probability with finance background setup