Exercise 16: Handling CSV files

Let's test your ability to handle .csv files.

Problem Statement

Using data from the file data.csv that contains a grocery list. This list contains the details of each item:

Structure of data.csv file
Structure of data.csv file

You have to fetch this data in your program and output just the list of items in a file out/outData.csv

Input

A file named data.csv that contains the grocery list.

Output

A file name output/outData.csv containing a list of the items only.

Sample Input

data.csv

Item, Price, Quantity
Apple, $10, 20
Banana, $5, 12
Mango, $17, 18

Sample Output

output/outData.csv

Apple
Banana
Mango

Test Yourself

Write your code in the given area. If you get stuck, you can look at the solution.

Press + to interact
main.r
data.csv
# Write your code here