<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Here, I will show you how to read questions.csv file. Let's do it.
Read csv formatted file without header
First above all, you need to import csv and yaml then read the csv formatted file.
Step1:  Read the first line and see the structure.
Step2:  Yes, each line is converted into list and it has 6 items as expected. However, how can we use the last item? It is string type but it seems dictionary or json.
OK, let's try to convert it into dictionary.
Step3:  Now, you know how to convert csv files into other formats that you want. So, you can handle all the given files.
Convert csv into list
Let's try to read train.csv.
Step4:  However, you know that train.csv has header which is not data we want to use. So, you might need to get rid of the first line. By the way, we need to know that reader returned by csv.reader is enumerater not list. So, you just use reader only once. If you want to use it once again, you need to use csv.reader once.
Step5:  OK, now reader is on the 2nd line of the csv flie. Try to convert it into list.
<ASSISTANT_TASK:>
Python Code:
import csv
import yaml
reader = csv.reader(open("../data/questions.csv"))
Explanation: Here, I will show you how to read questions.csv file. Let's do it.
Read csv formatted file without header
First above all, you need to import csv and yaml then read the csv formatted file.
End of explanation
question_1 = reader.next()
question_1
Explanation: Read the first line and see the structure.
End of explanation
yaml.load(question_1[-1].replace(": u'", ": '"))
Explanation: Yes, each line is converted into list and it has 6 items as expected. However, how can we use the last item? It is string type but it seems dictionary or json.
OK, let's try to convert it into dictionary.
End of explanation
reader = csv.reader(open("../data/train.csv"))
Explanation: Now, you know how to convert csv files into other formats that you want. So, you can handle all the given files.
Convert csv into list
Let's try to read train.csv.
End of explanation
reader.next()
Explanation: However, you know that train.csv has header which is not data we want to use. So, you might need to get rid of the first line. By the way, we need to know that reader returned by csv.reader is enumerater not list. So, you just use reader only once. If you want to use it once again, you need to use csv.reader once.
End of explanation
train_set = []
for row in reader:
    train_set.append(row)
print len(train_set)
print len(train_set[0])
print train_set[0]
print train_set[-1]
Explanation: OK, now reader is on the 2nd line of the csv flie. Try to convert it into list.
End of explanation
<END_TASK>