Skip to content

Commit 05b468b

Browse files
committed
CSV
1 parent 60d12f7 commit 05b468b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,12 +1651,12 @@ CSV
16511651
```python
16521652
import csv
16531653
<reader> = csv.reader(<file>, dialect='excel', delimiter=',')
1654-
<list> = next(<reader>) # Returns a row as list of strings.
1654+
<list> = next(<reader>) # Returns next row as list of strings.
16551655
```
16561656

16571657
```python
16581658
<writer> = csv.writer(<file>, dialect='excel', delimiter=',')
1659-
<writer>.writerow(<collection>) # Encodes objects using `str(<el>)`.
1659+
<writer>.writerow(<collection>) # Encodes objects using `str(<el>)`.
16601660
<writer>.writerows(<coll_of_coll>)
16611661
```
16621662
* **File must be opened with `'newline=""'` argument, or newlines embedded inside quoted fields will not be interpreted correctly!**
@@ -1669,7 +1669,7 @@ import csv
16691669
* **`'skipinitialspace'` - Whether whitespace after delimiter gets stripped.**
16701670
* **`'lineterminator'` - How does writer terminate lines.**
16711671
* **`'quoting'` - Controls the amount of quoting: 0 - as necessary, 1 - all.**
1672-
* **`'escapechar'` - Character for escaping quotechar if doublequote is false.**
1672+
* **`'escapechar'` - Character for escaping 'quotechar' if 'doublequote' is false.**
16731673

16741674
### Dialects
16751675
```text

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,11 +1481,11 @@
14811481

14821482
<div><h2 id="csv"><a href="#csv" name="csv">#</a>CSV</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> csv
14831483
&lt;reader&gt; = csv.reader(&lt;file&gt;, dialect=<span class="hljs-string">'excel'</span>, delimiter=<span class="hljs-string">','</span>)
1484-
&lt;list&gt; = next(&lt;reader&gt;) <span class="hljs-comment"># Returns a row as list of strings.</span>
1484+
&lt;list&gt; = next(&lt;reader&gt;) <span class="hljs-comment"># Returns next row as list of strings.</span>
14851485
</code></pre></div>
14861486

14871487
<pre><code class="python language-python hljs">&lt;writer&gt; = csv.writer(&lt;file&gt;, dialect=<span class="hljs-string">'excel'</span>, delimiter=<span class="hljs-string">','</span>)
1488-
&lt;writer&gt;.writerow(&lt;collection&gt;) <span class="hljs-comment"># Encodes objects using `str(&lt;el&gt;)`.</span>
1488+
&lt;writer&gt;.writerow(&lt;collection&gt;) <span class="hljs-comment"># Encodes objects using `str(&lt;el&gt;)`.</span>
14891489
&lt;writer&gt;.writerows(&lt;coll_of_coll&gt;)
14901490
</code></pre>
14911491
<ul>
@@ -1499,7 +1499,7 @@
14991499
<li><strong><code class="python hljs"><span class="hljs-string">'skipinitialspace'</span></code> - Whether whitespace after delimiter gets stripped.</strong></li>
15001500
<li><strong><code class="python hljs"><span class="hljs-string">'lineterminator'</span></code> - How does writer terminate lines.</strong></li>
15011501
<li><strong><code class="python hljs"><span class="hljs-string">'quoting'</span></code> - Controls the amount of quoting: 0 - as necessary, 1 - all.</strong></li>
1502-
<li><strong><code class="python hljs"><span class="hljs-string">'escapechar'</span></code> - Character for escaping quotechar if doublequote is false.</strong></li>
1502+
<li><strong><code class="python hljs"><span class="hljs-string">'escapechar'</span></code> - Character for escaping 'quotechar' if 'doublequote' is false.</strong></li>
15031503
</ul><div><h3 id="dialects">Dialects</h3><pre><code class="text language-text">+------------------+-----------+-----------+--------------+
15041504
| | excel | excel_tab | unix_dialect |
15051505
+------------------+-----------+-----------+--------------+

0 commit comments

Comments
 (0)