better usage of pandas