We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6dc44e commit 1d2fbbbCopy full SHA for 1d2fbbb
1 file changed
Notes/01_Introduction/06_Files.md
@@ -220,14 +220,17 @@ Try it:
220
221
```python
222
>>> import gzip
223
->>> with gzip.open('Data/portfolio.csv.gz') as f:
+>>> with gzip.open('Data/portfolio.csv.gz', 'rt') as f:
224
for line in f:
225
print(line, end='')
226
227
... look at the output ...
228
>>>
229
```
230
231
+Note: Including the file mode of `'rt'` is critical here. If you forget that,
232
+you'll get byte strings instead of normal text strings.
233
+
234
### Commentary: Shouldn't we being using Pandas for this?
235
236
Data scientists are quick to point out that libraries like
0 commit comments