csv

READ

How to read CSV file by Python.

1. use “with”

Reference to Python Document

2. without “with”

You need close in this case.

3. use pandas module

Reading by pandas is smart and useful!


WRITE

How to write CSV file by Python

1. csv.writer (use “with”)

lineterminator

2. csv.writer (without “with”)

3. pandas.Dataframe

Leave a Reply