] On Behalf Of Raymond
Hettinger
Sent: Wednesday, April 29, 2009 10:31 AM
To: python-list@python.org
Subject: Re: sorting items in a table problematic because of scientific notation
[John Machin]
'NEAR_DIST'], [('N', 9, 0), ('N', 9, 0), ('F', 19, 11)], [53, 55, '
The data type code for the offending
Thanks. Didn't used to be that way I don't think.
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
float('1.23456789e+004 ')
12345.6789
John :-)
Maybe string.ato[if] used to
On 29/04/2009 11:33 PM, s...@pobox.com wrote:
Thanks. Didn't used to be that way I don't think.
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
float('1.23456789e+004 ')
12345.6789
Maybe string.ato[if] used to behave that way?
John Nope.
...
OK, I remember what it was. The C atof()/atoi() functions will stop at the
first non-numeric character. (I believe the more modern strtod/strtof
functions behave the same way.) You could thus call
atof( 12345
[John Machin]
'NEAR_DIST'], [('N', 9, 0), ('N', 9, 0), ('F', 19, 11)], [53, 55, '
The data type code for the offending column is F which is not in the
bog-standard dBase III set of C, N, D, and L. The code that you have used
merely
returns unchanged the character string that finds in the
Hi All,
I have a dbf table outputted by another program that I cannot (I'm pretty sure)
change the format of.
I use a dbf reader code found online
(http://code.activestate.com/recipes/362715/ ) to read the table in and I need
to sort it on a particular field but this field has scientific
Amélie Hi All,
Amélie I have a dbf table outputted by another program that I cannot
Amélie (I'm pretty sure) change the format of.
Amélie I use a dbf reader code found online
Amélie (http://code.activestate.com/recipes/362715/ ) to read the table
Amélie in and I need to
Davis, Amelie Y wrote:
Hi All,
I have a dbf table outputted by another program that I cannot (I’m
pretty sure) change the format of.
I use a dbf reader code found online
(http://code.activestate.com/recipes/362715/ ) to read the table in and
I need to sort it on a particular field but this
s...@pobox.com wrote:
Amélie Hi All,
Amélie I have a dbf table outputted by another program that I cannot
Amélie (I'm pretty sure) change the format of.
Amélie I use a dbf reader code found online
Amélie (http://code.activestate.com/recipes/362715/ ) to read the table
MRAB FYI:
float(s)
105646.365517
MRAB which saves a few keystrokes. :-)
Thanks. Didn't used to be that way I don't think.
--
Skip Montanaro - s...@pobox.com - http://www.smontanaro.net/
XML sucks, dictionaries rock - Dave Beazley
--
Davis, Amelie Y aydavis at purdue.edu writes:
Hi All,
I have a
dbf table outputted by another program that I cannot (I’m pretty sure)
change the format of.
I use a
dbf reader code found online (http://code.activestate.com/recipes/362715/
) to read the table in and I need to sort it on
skip at pobox.com writes:
MRAB FYI:
float(s)
105646.365517
MRAB which saves a few keystrokes.
Thanks. Didn't used to be that way I don't think.
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch
12 matches
Mail list logo