Json file example:
{
"name": "John Doe",
"age": 30,
"height": null,
"weight": NaN,
}
{
"name": "Jim Hanks",
"age": NaN,
"height": NaN,
"weight": NaN,
}
now imagine there are a lot of rows some containing only NaNs some containing a few NaNs.. and so on
For every row NaNs have to removed not gsubbed or anything like that
I tried approaches like using import math and isnan() but my function only gsubbed it with null.
I`m not really a python guy :/
output should be:
{
"name": "John Doe",
"age": 30,
"height": null,
}
{
"name": "Jim Hanks",
}
all help is appreciated
2
Answers
What about using external function to process the json file?
Can help