scientific-notation Questions

4

Solved

This question is not seeking developer code formatting opinions. Personally, I prefer to use scientific notation in my JS code when I can because I believe it is more readable. For me, 6e8 is more ...
Foreignborn asked 22/9, 2017 at 14:10

3

Solved

In Python, scientific notation always gives me 2 digits in exponent: print('%17.8E\n' % 0.0665745511651039) 6.65745512E-02 However, I badly want to have 3 digits like: 6.65745512E-002 Can we ...
Bathesda asked 27/8, 2016 at 19:3

3

Solved

I'm dividing a very long into much smaller number. Both are of type decimal.Decimal(). The result is coming out in scientific notation. How do I stop this? I need to print the number in full. >&...
Scherzo asked 7/6, 2021 at 23:19

3

I have a CSV like that: COL,VAL TEST,100000000.12345679 TEST2,200000000.1234 TEST3,9999.1234679123 I want to load it having the column VAL as a numeric type (due to other requirements of the proje...
Promoter asked 10/11, 2020 at 16:31

3

Solved

I would like to have consistent output for a particular R script. In this case, I would like all numeric output to be in scientific notation with exactly two decimal places. Examples: 0.05 -->...
Redemption asked 21/9, 2016 at 18:7

4

Solved

Consider the following Python snippet: for ix in [0.02, 0.2, 2, 20, 200, 2000]: iss = str(ix) + "e9" isf = float(iss) print(iss + "\t=> " + ("%04.03e" % isf) + &...
Soloman asked 24/11, 2011 at 20:43

3

Solved

I have a column called accountnumber with values similar to 4.11889000e+11 in a pandas dataframe. I want to suppress the scientific notation and convert the values to 4118890000. I have tried the f...
Helmsman asked 18/4, 2018 at 22:5

3

Solved

I have the following code: plt.plot(range(2003,2012,1),range(200300,201200,100)) # several solutions from other questions have not worked, including # plt.ticklabel_format(style='sci', axis='x', sc...
Seda asked 6/2, 2015 at 17:44

3

How can get following formatting (input values are always less than 0.1): > formatting(0.09112346) 0.91123E-01 > formatting(0.00112346) 0.11234E-02 and so on. I am looking for some elegan...
Crib asked 13/11, 2018 at 6:9

6

I have a dataframe with a column of p-values, and I want to make a selection on these p-values. > pvalues_anova [1] 9.693919e-01 9.781728e-01 9.918415e-01 9.716883e-01 1.667183e-02 [6] 9.952762e...
Allomorphism asked 18/3, 2011 at 12:40

5

Solved

json.dumps outputs small float or decimal values using scientific notation, which is unacceptable to the json-rpc application this output is sent to. >>> import json >>> json.dum...
Groundspeed asked 21/9, 2013 at 19:12

9

Solved

double x = 1500; for(int k = 0; k<10 ; k++){ double t = 0; for(int i=0; i<12; i++){ t += x * 0.0675; x += x * 0.0675; } cout<<"Bas ana: "<<x<<"\tSon fai...
Breaker asked 6/3, 2011 at 17:13

3

Solved

Context We display percentage values to agents in our app without trailing zeros (50% is much easier to quickly scan than is 50.000%), and hitherto we've just used quantize to sort of brute force ...
Internee asked 26/10, 2017 at 14:47

2

Solved

The only way I know how to use scientific notation for the end of the axes in matplotlib is with plt.ticklabel_format(style='sci', axis='y', scilimits=(0,0)) but this will use 1e instead of x10. ...
Regulable asked 24/1, 2019 at 20:28

3

Solved

I figured this would be an easy one, but I can't find any information about it anywhere. Lets say a user enters 123456. I want to display this in scientific notation. So that would be 1.23456 * 10^...
Oryx asked 9/7, 2015 at 3:48

3

Solved

As you all know since it is one of the most asked topic on SO, I am having problems with rounding errors (it isn't actually errors, I am well aware). Instead of explaining my point, I'll give an ex...

8

Solved

How can one modify the format for the output from a groupby operation in pandas that produces scientific notation for very large numbers? I know how to do string formatting in python but I'm at a...

2

Solved

It seems like there are plenty of answers on how to disable the scientific notation in Bokeh on numbers displayed on x and y axis. But how about disabling it for the hover tool?
Hospodar asked 1/3, 2017 at 15:51

4

Solved

I am trying to put a colorbar to my image using matplotlib. The issue comes when I try to force the ticklabels to be written in scientific notation. How can I force the scientific notation (ie, 1x1...
Orientation asked 22/9, 2014 at 21:14

4

Solved

Could someone explain why I can not use int() to convert an integer number represented in string-scientific notation into a python int? For example this does not work: print int('1e1') But this...
Wanigan asked 30/9, 2015 at 8:31

4

Solved

I want to be able to write a function which receives a number in scientific notation as a string and splits out of it the coefficient and the exponent as separate items. I could just use a regular ...
Stratiform asked 12/3, 2009 at 13:13

7

Solved

I put .describe() to a Dataframe, the output doesn't look nice. I want the output to show the whole number and not be simplified with exponentials. Input: df["A"].describe() How the output loo...
Wolverhampton asked 28/3, 2019 at 10:5

13

Solved

How can I display Decimal('40800000000.00000000000000') as '4.08E+10'? I've tried this: >>> '%E' % Decimal('40800000000.00000000000000') '4.080000E+10' But it has those extra 0's.

2

Solved

I have a bar chart that looks like how I want it to look, except for the scientific notation on the y-axes. Some other solutions included using ax.yaxis.set_major_formatter(tick) which didn't...
Expectation asked 13/1, 2019 at 2:14

1

Solved

I have a bunch of numbers in scientific notation and I would like to find their exponent. For example: >>> find_exp(3.7e-13) 13 >>> find_exp(-7.2e-11) 11 Hence I only need their...
Madera asked 3/10, 2020 at 11:37

© 2022 - 2024 — McMap. All rights reserved.