Data360 Analyze

 View Only
  • 1.  Output csv Format Issue = Amounts

    Posted 06-25-2024 03:19

    Hi Folks

    I was hoping that someone could advise me within the D360 node to output data as csv, to remove the double quotes from a double formatted field.

    Currently using the csv node, when there is an amount of $1,234.56 it outputs this as "1,234.56", I would like this value to output as 1234.56

    Looking forward to your reply



    ------------------------------
    andrew darnell
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: Output csv Format Issue = Amounts

    Employee
    Posted 06-25-2024 05:40

    In Data360 Analyze a field that has a data type of double does not permit the use of the thousands separator character e.g. "," in the value so I assume the value being output is actually a unicode/string value.

    The Output CSV/Delimited node will automatically include the quote characters around a value that includes the separator character ','.

    You can use some Python code in a Transform node to remove the thousands separator character from the unicode/string value. See the following example where the 'Sales_Amount' field contains the value to be changed and it is output in the 'Numeric_Sales_Amount' field:

    if fields.Sales_Amount is not Null:
        out1.Numeric_Sales_Amount = fields.Sales_Amount.replace("$","").replace(",","")



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------