Flatten json to csv python