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


Groups > fr.comp.lang.python > #3094

Suppression des ligne d'un fichier csv en python.

Newsgroups fr.comp.lang.python
Date 2018-06-27 00:37 -0700
Message-ID <76ac017a-9b98-4ea8-8114-e4861dcf14ff@googlegroups.com> (permalink)
Subject Suppression des ligne d'un fichier csv en python.
From achourbouarab5@gmail.com

Show all headers | View raw


Bonjour,

Je voulais manipuler sur un fichier csv qui contient plus de un million de données.

SVP, je cherche un moyen au une instruction pour éliminer les lignes qui ne portent pas des informations dans ce fichier sachant jusqu'à mtn j'ai ouvert le fichier mais j'en sais pas comment utiliser la fonction par exemple filter() pour éliminer toute les lignes vide:  

import pandas
import numpy as np
import re
import csv

# LIRE LE FICHIERLOG.CSV
file=open("fichierLog.csv","r")
test=csv.reader(file)
for row in test:
    print(row)


Merci d'avance

Back to fr.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Suppression des ligne d'un fichier csv en python. achourbouarab5@gmail.com - 2018-06-27 00:37 -0700
  Re: Suppression des ligne d'un fichier csv en python. achourbouarab5@gmail.com - 2018-06-27 02:14 -0700

csiph-web