I have a list of json files ([login to view URL], [login to view URL], ... ) Within each vp_***.json I need to replace 3 values which are different in each file. These 3 values should be replaced with corresponding values matching the file name from the list with corresponding values ([login to view URL]).
I need a script to batch process the file list on a Window 10 pc.
The 3 values to find are "yaw", "pitch" and "roll" within the position params, in each json file the. In the json file this looks like:
Note that "yaw", "pitch" and "roll" occur a couple of times in each file for different parameters, "yaw", "pitch" and "roll" occur 4 times as “position” “params” only the values of the first occurrence should be replaced
In [login to view URL] the script should find the corresponding values for each file: lookup "vp_***" and find “ptgui_yaw” “ptgui_pitch” “ptgui_roll” values and use these values to replace "yaw", "pitch" and "roll" in "vp_***.json"
For [login to view URL] in the [login to view URL] this looks like:
vp_001", "ptgui_yaw": 255.322018, "ptgui_pitch": -12.96181767, "ptgui_roll": 3.821169483,
Note that the values in "vp_***" have a scientific notation eg. -1.04677981999999986e, the values to replace with do not have a scientific notation yet in the [login to view URL] but should get the same scientific notation.
For [login to view URL] the result should be:
14 freelancers are bidding on average €143 for this job
Hi, there. I am an applied data scientist. I am proficient in Python and JSON. Carefully checked your requirements. I can help you with this project. Hope we can discuss more deeply via chat. Best regards, Sgadou
Hi, There. I am a python expert. I can do it perfectly on a short time Maybe we can use the python panda to parse the json or csv. Wish your kind response. Thank you, Andrey