Remove Scientific Notation while writing into a dataset using Python Recipe

Options
sagar_dubey
sagar_dubey Partner, Registered Posts: 17 Partner

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

Tagged:

Best Answer

  • kathyqingyuxu
    kathyqingyuxu Neuron, Registered, Neuron 2022 Posts: 46 Neuron
    Answer ✓
    Options

    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

Answers

  • sagar_dubey
    sagar_dubey Partner, Registered Posts: 17 Partner
    Options

    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

Setup Info
    Tags
      Help me…