Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

SQLExecutor2 query_to_df avoid converting 'N/A' to NaN

Level 2
SQLExecutor2 query_to_df avoid converting 'N/A' to NaN


I am using SQLExecutor2 python library in dataiku to execute a query from Oracle database. The default behavior of the method query_to_df converts the string 'N/A' to NaN. How can I change this? I would like to get the string value of 'N/A'. 


0 Kudos
2 Replies


Unfortunately, this is not possible when using SQLExecutor2. By default, all NULL, Nan, NA, and N/A are NaN for pandas, and there is no way to change this when using query_to_df.

We'll take note of this and pass this request to our product team for future consideration.

Technical Support Engineer
0 Kudos

I doubt the field is a string (varchar2 in Oracle) or that you have a string value of "N/A". Neither pandas nor Dataiku will convert a string column to a NaN. So you either have nulls or your column is not a string. Please check your data types of your input table in Oracle and your dataset schema settings in Dataiku and let us know the data types and what exactly is the column when you see a NaN in the output.

0 Kudos