Writing to an Excel spreadsheet

后端 未结 12 1874
不知归路
不知归路 2020-11-22 04:39

I am new to Python. I need to write some data from my program to a spreadsheet. I\'ve searched online and there seem to be many packages available (xlwt, XlsXcessive, openpy

12条回答
  •  忘了有多久
    2020-11-22 05:31

    The easiest way to import the exact numbers is to add a decimal after the numbers in your l1 and l2. Python interprets this decimal point as instructions from you to include the exact number. If you need to restrict it to some decimal place, you should be able to create a print command that limits the output, something simple like:

    print variable_example[:13]
    

    Would restrict it to the tenth decimal place, assuming your data has two integers left of the decimal.

提交回复
热议问题