Forum Discussion
Anonymous
7 years agoNot applicable
Python converts "NA" to NaN
Hello I've recently started using Python when building queries for some more advanced data manipulation. However, it seems like Python (more specifically the Pandas library) automatically assumes th...
v-juanli-msft
Community Support
7 years agoHi Anonymous
A temperory method you may have a try:
Replace the value "NA" with another spefic value before executing python script in Power BI,
After importing the data in Power BI, use Query editor to replace the value (Queries editor->Transform->Replace values).
Best Regards
Maggie
Anonymous
7 years agoNot applicable
Thanks for your response!
This does seem to work, but it is of course a bit of a hack, so I hope a more elegant solution could be found in the future. It does seem like Python/Pandas is the culprit here, but ideally Power BI would provide an option to bypass this strange behaviour.
Should I do anything more to report this, or is this post enough?