Regarding pandas question


how to solve ?