![]() "greeting": "Hello, Laverne Robles! You have 4 unread messages.", Quis consectetur commodo velit aliquip cupidatat et esse.\r\n", Nisi excepteur Lorem irure pariatur fugiat occaecat labore officia. Proident non et reprehenderit consequat ea adipisicing. Et tempor excepteur aute consequat in sunt aliquip in. ![]() "about": "Anim ut sunt consectetur irure irure sit consectetur et laboris minim. "address": "783 Livingston Street, Hillsboro, District Of Columbia, 1897", For example purpose, I am going to create the JSON dataset which is somewhat similar to my problem for that I used the JSON Generator tool. Using that wrote code according to my requirement. Some keys commonly available in each JSON and some keys present in some JSONs and absent in some JSONs.Īfter some googling found answer to the above problems here. Load each JSON so that it will become a dictionary object then we can put it in the list after that using Dictwriter in CSV module we can write it to CSV file but we have 3 problems hereĢ. We can easily write JSON data to CSV file if JSON is flat structured and we know all the keys. After that, we can analyze the data and then we can impute where we can and drop features that we can’t impute. By doing it we also will know about which features we have data and for which we don’t. Currently, I am working on a Machine Learning project with my colleagues where we don’t have much data to train the model so we scrapped data from multiple places and kept in JSON format because sometimes we get data for some fields or keys and sometimes we don’t.īut when we use it for training we need to put them in table structure or CSV format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |