Advantages of using CSV Module¶
Let us go through the advantages related to CSV.
- Readability and lesser code while dealing with files containing delimited records or lines.
- We can avoid iterable of strings as intermediate data structure while reading delimited data from files as well as writing the iterables of tuples or dicts into delimited files.
- Data processing libraries such as pandas, pyspark, etc have lot more options while dealing with delimited files as well as iterables using tuples or dicts. But the additional capabilities comes with additional overhead.
- We typically use csv over pandas or pyspark as part of backend development for web or mobile applications. Libraries such as pandas and pyspark are more relevant for data driven applications which involves heavy weight data processing.