I have a .json file which contains some data and was obtained by exporting a mongoDB database collection. In order to test perform Machine Learning Training and Testing on the data, I want to split the json file into 2 separate files following a particular test-train ratio, which I'm unable to do on my Python notebook, or on the mongoDB console.
I have tried to manually split the records using notepad, but that doesn't ensure accuracy I need for splitting.
I also tried converting the json file to a Pandas dataframe, but then I lose the format in which data is stored, since to_json()
saves all the records of the first column first, second column second, and so on, which I don't want.
My json file is available here!