Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84991

Re: CSV and number formats

Date 2015-02-01 00:22 -0800
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: CSV and number formats
References <maki32$iav$1@ger.gmane.org> <makk94$g14$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.18355.1422778947.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 01/31/2015 11:23 PM, Mark Lawrence wrote:
> On 01/02/2015 06:45, Frank Millman wrote:
>>
>>
>> Most transaction amounts are in the format '-00000031.23' or '+00000024.58'
>>
>> This can easily be parsed using decimal.Decimal().
>>
>> If the opening balance is positive, it appears as '+00000021.45'
>>
>> If it is negative, it appears as '+00000-21.45'

1) I have never seen that format before.

2) Regular transactions (non-opening balance) appear normally.

3) That's a bug!

4) Easiest workaround is probably to lstrip('+0').

--
~Ethan~

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: CSV and number formats Ethan Furman <ethan@stoneleaf.us> - 2015-02-01 00:22 -0800

csiph-web