Bloomberg Interview Question

simple problems using python pandas