how to convert a pandas df into a nested json