Loading and Saving Data

2 / 8

Loading and Saving Data - Common File Formats




Not able to play video? Try with vimeo


Please login to comment

2 Comments

When we compare map split and CSVParser, Both are providing same results like Array of Array String. If then, How CSV functionary differs with splity. In both cases, Records are internally treated based on New Line .

 

 

 

  Upvote    Share

The main difference between the map.split() method and the CSVParser function is that the CSVParser function is specifically designed to parse CSV files, while the map.split() method is a more general-purpose method for splitting strings. The CSVParser function can handle cases where the CSV file has a different delimiter, has fields enclosed in quotes, and can handle escaped quotes within fields. Additionally, the CSVParser can handle malformed CSV which map.split() can't.

 1  Upvote    Share