How to turn off scientific notation in pyspark?

后端 未结 1 1303
死守一世寂寞
死守一世寂寞 2020-12-06 17:12

As the result of some aggregation i come up with following sparkdataframe:

 ------------+-----------------+-----------------+
|sale_user_id|gross_profit              


        
相关标签:
1条回答
  • 2020-12-06 17:56

    The easiest way is to cast double column to decimal, giving appropriate precision and scale:

    df.withColumn('total_sale_volume', df.total_sale_volume.cast(DecimalType(18, 2)))
    
    0 讨论(0)
提交回复
热议问题