Kaydet (Commit) 2b2795ac authored tarafından Skip Montanaro's avatar Skip Montanaro

show how easy it is to manipulate individual columns - from a request on

c.l.py
üst 1dffb120
......@@ -319,6 +319,15 @@ for row in reader:
print row
\end{verbatim}
To print just the first and last columns of each row try
\begin{verbatim}
import csv
reader = csv.reader(file("some.csv", "rb"))
for row in reader:
print row[0], row[-1]
\end{verbatim}
The corresponding simplest possible writing example is
\begin{verbatim}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment