Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8238777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:55:45+00:00 2026-06-07T19:55:45+00:00

I have a float variable, obj[time], which represents the unix time, previously I write

  • 0

I have a float variable, obj[“time”], which represents the unix time, previously I write the result to a text file, so I could use

  fd_out.write("%.6f\n" %(obj["time"])) 

to force the result to have 6 decimal. But now I want to print the result into csv file instead, so I used:

  writer.writerow((obj["time"]))

the result only have 2 decimal by default, how could I change it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T19:55:46+00:00Added an answer on June 7, 2026 at 7:55 pm

    Using an intermediate format should solve your problem, like this example:

    writer.writerow(("%.6f" % obj["time"], ))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have a text file with three lines. every line has a float
I have the class Variable[X <: SeqVal[_]](initialState:Calc[X]) which I instantiate with new Variable[SeqVal[Float]](Max()) where
Hello friends I Have a float type variable ,which contains a total price of
i get the value from textbox.Text i have the variable float _value; that store
I currently have a variable that looks like this: val someVal = new HashMap[Float,
I have a variable float slope that sometimes will have a value of nan
I have to check a float variable to determine the existence of a particular
I have variable like float num = (x/y); I need to round up the
I have a user input which can contain float values ranging from : 3.06
in this variable: $this->item->text I have this string: <!-- JoomlaWorks Disqus Comment System for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.