Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84991
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'amounts': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'lawrence': 0.09; 'message- id:@stoneleaf.us': 0.09; 'parsed': 0.09; 'subject:number': 0.09; '~ethan~': 0.09; 'before.': 0.16; 'filename:fname piece:signature': 0.16; 'negative,': 0.16; 'normally.': 0.16; 'positive,': 0.16; 'subject:CSV': 0.16; 'wrote:': 0.18; 'appears': 0.22; 'header:User-Agent:1': 0.23; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; "skip:' 10": 0.31; 'workaround': 0.31; 'probably': 0.32; 'regular': 0.32; 'transaction': 0.35; 'easily': 0.37; 'easiest': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'most': 0.60; 'balance': 0.61; 'received:173': 0.61; 'frank': 0.68; 'bug!': 0.84; 'transactions': 0.91 |
| Date | Sun, 01 Feb 2015 00:22:21 -0800 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: CSV and number formats |
| References | <maki32$iav$1@ger.gmane.org> <makk94$g14$1@ger.gmane.org> |
| In-Reply-To | <makk94$g14$1@ger.gmane.org> |
| Content-Type | multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4pN1BLob8pO5I7aTdMWEFQdRU5cxKrrFH" |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18355.1422778947.18130.python-list@python.org> (permalink) |
| Lines | 54 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1422778947 news.xs4all.nl 2852 [2001:888:2000:d::a6]:40225 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:84991 |
Show key headers only | 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
Re: CSV and number formats Ethan Furman <ethan@stoneleaf.us> - 2015-02-01 00:22 -0800
csiph-web