diff --git a/README.md b/README.md
index 6ebf130..65e3060 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,48 @@
-# csv
+# csv reader
+*author: junjie.jiang*
+
+
+
+
+## Desription
+
+Wrapper of python csv: https://docs.python.org/3.8/library/csv.html
+
+The parameters are consistent with csv.reader
+
+
+
+
+## Code Example
+
+### Example
+
+```python
+from towhee import DataLoader, pipe, ops
+p = (
+ pipe.input('image_path')
+ .map('image_path', 'image', ops.image_decode.cv2())
+ .map('image', 'vec', ops.image_embedding.timm(model_name='resnet50'))
+ .output('vec')
+
+)
+
+# csv data format: id,image_path,label
+for data in DataLoader(ops.data_source.csv_reader('./reverse_image_search.csv'), parser=lambda x: x[1]):
+ print(p(data).to_list(kv_format=True))
+
+# batch
+for data in DataLoader(ops.data_source.csv_reader('./reverse_image_search.csv'), parser=lambda x: x[1], batch_size=10):
+ p.batch(data)
+```
+
+
+
+
+**Parameters:**
+
+
+***f_path:*** *str*
+
+csv file path
diff --git a/read_csv.py b/read_csv.py
index 9a394bc..0c87a57 100644
--- a/read_csv.py
+++ b/read_csv.py
@@ -6,14 +6,13 @@ class ReadCSV(PyOperator):
"""
Wrapper of python csv: https://docs.python.org/3.8/library/csv.html
"""
- def __init__(self, f_path: str, newline='', dialect='excel', **fmtparams):
+ def __init__(self, f_path: str, dialect='excel', **fmtparams):
self._f_path = f_path
- self._newline = newline
self._dialect = dialect
self._fmtparams = fmtparams
def __call__(self):
- with open(self._f_path, newline=self._newline) as f:
+ with open(self._f_path, newline='') as f:
reader = csv.reader(f, self._dialect, **self._fmtparams)
# skip header
next(reader)