Discover this year's submissions to the Dataiku Frontrunner Awards and give kudos to your favorite use cases and success stories!READ MORE

Remove Scientific Notation while writing into a dataset using Python Recipe

Solved!
sagar_dubey
Level 1
Level 1
Remove Scientific Notation while writing into a dataset using Python Recipe

Hi,

I have a pandas dataframe which has column containing decimal values and I'm writing this dataframe into a dataiku dataset. However, I can see the records properly in my dataframe as "75100000.00" but while pushing this into dataiku dataframe it is getting converted into "7.51E7". Since the column has null values too I cannot convert them into int type as well. Any help would be really helpful.

 

 

Thanks,

Sagar

0 Kudos
1 Solution
kathyqingyuxu
Neuron
Neuron

Hey @sagar_dubey ,

As a workaround, have you tried testing saving the data as type string vs double? On my side I am able to see the entire number if the type if "string, decimal" vs. if I save the same as type "double, decimal", see attached example.

Screen Shot 2022-03-14 at 2.22.19 PM.png

Screen Shot 2022-03-14 at 2.26.33 PM.png

Hope this helps!

Best,

Kathy

View solution in original post

2 Replies
kathyqingyuxu
Neuron
Neuron

Hey @sagar_dubey ,

As a workaround, have you tried testing saving the data as type string vs double? On my side I am able to see the entire number if the type if "string, decimal" vs. if I save the same as type "double, decimal", see attached example.

Screen Shot 2022-03-14 at 2.22.19 PM.png

Screen Shot 2022-03-14 at 2.26.33 PM.png

Hope this helps!

Best,

Kathy

sagar_dubey
Level 1
Level 1
Author

Hey @kathyqingyuxu 

Thanks for the quick response.

I have one more question is that even if we have a scientific notation in our values if we try to plot these values into charts will it work? since "String" shouldn't be the ideal datatype as we need to plot these values to see the trends. 

 

Please let us know your thoughts.

 

Thanks,

Sagar

0 Kudos