Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
14aaee14
Kaydet (Commit)
14aaee14
authored
Ock 06, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1686390: add example for csv.Sniffer use.
üst
2cb103ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
csv.rst
Doc/library/csv.rst
+9
-2
No files found.
Doc/library/csv.rst
Dosyayı görüntüle @
14aaee14
...
@@ -220,7 +220,6 @@ The :mod:`csv` module defines the following classes:
...
@@ -220,7 +220,6 @@ The :mod:`csv` module defines the following classes:
The :class:`Sniffer` class provides two methods:
The :class:`Sniffer` class provides two methods:
.. method:: Sniffer.sniff(sample[, delimiters=None])
.. method:: Sniffer.sniff(sample[, delimiters=None])
Analyze the given *sample* and return a :class:`Dialect` subclass reflecting the
Analyze the given *sample* and return a :class:`Dialect` subclass reflecting the
...
@@ -233,9 +232,17 @@ The :class:`Sniffer` class provides two methods:
...
@@ -233,9 +232,17 @@ The :class:`Sniffer` class provides two methods:
Analyze the sample text (presumed to be in CSV format) and return :const:`True`
Analyze the sample text (presumed to be in CSV format) and return :const:`True`
if the first row appears to be a series of column headers.
if the first row appears to be a series of column headers.
The :mod:`csv` module defines the following constants:
An example for :class:`Sniffer` use::
csvfile = open("example.csv")
dialect = csv.Sniffer().sniff(csvfile.read(1024))
csvfile.seek(0)
reader = csv.reader(csvfile, dialect)
# ... process CSV file contents here ...
The :mod:`csv` module defines the following constants:
.. data:: QUOTE_ALL
.. data:: QUOTE_ALL
Instructs :class:`writer` objects to quote all fields.
Instructs :class:`writer` objects to quote all fields.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment