Suppressing scientific notation in pandas?

后端 未结 4 1374
清酒与你
清酒与你 2020-11-27 05:49

I have a DataFrame in pandas where some of the numbers are expressed in scientific notation (or exponent notation) like this:

                  id        val         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 06:33

    If you would like to use the values as formated string in a list, say as part of csvfile csv.writier, the numbers can be formated before creating a list:

    df['label'].apply(lambda x: '%.17f' % x).values.tolist()
    

提交回复
热议问题