Deutsch   English   Français   Italiano  
<sfde4p$m6u$1@cabale.usenet-fr.net>

View for Bookmarking (what is this?)
Look up another Usenet article

X-Received: by 2002:a1c:a181:: with SMTP id k123mr14300174wme.90.1629109209260;
        Mon, 16 Aug 2021 03:20:09 -0700 (PDT)
Path: ...!news-out.google.com!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!.POSTED!not-for-mail
From: Olivier Miakinen <om+news@miakinen.net>
Newsgroups: fr.comp.lang.python
Subject: =?UTF-8?Q?Re:_Caract=c3=a8re_parasite_dans_une_cellule_de_tableur.?=
Date: Mon, 16 Aug 2021 12:20:09 +0200
Organization: There's no cabale
Lines: 26
Message-ID: <sfde4p$m6u$1@cabale.usenet-fr.net>
References: <sf7lu3$1c7m$1@gioia.aioe.org>
 <sfaih5$2pdt$1@cabale.usenet-fr.net> <sfd5os$19jm$1@gioia.aioe.org>
NNTP-Posting-Host: 132.184.116.78.rev.sfr.net
Mime-Version: 1.0
X-Trace: cabale.usenet-fr.net 1629109209 22750 78.116.184.132 (16 Aug 2021 10:20:09 GMT)
X-Complaints-To: abuse@usenet-fr.net
NNTP-Posting-Date: Mon, 16 Aug 2021 10:20:09 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101
 Firefox/60.0 SeaMonkey/2.53.1
In-Reply-To: <sfd5os$19jm$1@gioia.aioe.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bytes: 1907

Le 16/08/2021 à 09:57, Dominique m'a répondu :
>>
>> $ od -c test.csv
> 
> Je ne connaissais pas od. C'est idéal pour voir les caractères « 
> invisibles » :-)

L'option -c est pratique quand il y a beaucoup de caractères US-ASCII.

Pour un fichier plus « binaire » j'utilise le plus souvent -t x1.

> [...]
> 
>> str.replace("\n", " ")
> 
> Ça a fonctionné exactement comme je le désirais, et depuis Pandas. Merci :-)

Eh bien c'est parfait, ravi d'avoir aidé. Note que pour un remplacement
un peu plus complexe il y aurait eu les expressions rationnelles :
 <https://docs.python.org/fr/3/library/re.html>
et un groupe pour en parler :
 fr.comp.lang.regexp

Cordialement,
-- 
Olivier Miakinen