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


Groups > comp.lang.python > #84991 > unrolled thread

Re: CSV and number formats

Started byEthan Furman <ethan@stoneleaf.us>
First post2015-02-01 00:22 -0800
Last post2015-02-01 00:22 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#84991 — Re: CSV and number formats

FromEthan Furman <ethan@stoneleaf.us>
Date2015-02-01 00:22 -0800
SubjectRe: CSV and number formats
Message-ID<mailman.18355.1422778947.18130.python-list@python.org>

[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~

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web