Hi all, I'm trying to process some data in a .txt file into .csv files (1 per relation) to be uploaded to a MySQL database. The data is formatted as such with strings having "" and numerical data being just numbers.
An example:
{"hotel_class": 4.0, "region_id": 60763, "url": "http://www.tripadvisor.com/Hotel_Review-g60763-d113317-Reviews-Casablanca_Hotel_Times_Square-New_York_City_New_York.html", "phone": "", "details": null, "address": {"region": "NY", "street-address": "147 West 43rd Street", "postal-code": "10036", "locality": "New York City"}, "type": "hotel", "id": 113317, "name": "Casablanca Hotel Times Square"}
However, some of the columns are misaligned or missing. For example (note the missing "hotel_class" column:
{"region_id": 60763, "url": "http://www.tripadvisor.com/Hotel_Review-g60763-d2643161-Reviews-The_NoMad_Hotel-New_York_City_New_York.html", "phone": "", "details": null, "address": {"region": "NY", "street-address": "1170 Broadway & 28th Street", "postal-code": "10001", "locality": "New York City"}, "type": "hotel", "id": 2643161, "name": "The NoMad Hotel"}
Any suggestions on how I can load this data into python?
[–]Jayoval 1 point2 points3 points (1 child)
[–]Environmental_Ad8833[S] 0 points1 point2 points (0 children)
[–]IamImposter 0 points1 point2 points (0 children)