1.find the wrong data and make sure the data indeed wrong, if so use del statement to delete it For instance, remove the row with the index 149 from a data set data stored as a list of list, you can use the code del data[149] make sure you run the delstatement only once, otherwise you’ll delete more then more row. You may try the length of data set to figure out weather you have delete it.
2.remove duplicate entries
1.make sure there do exits duplicate,take one as an example
2. find all the duplicates: 设置两个数组,一个用来保存有重复的,另一个保存unique ones,遍历所有数据,若在保存唯一数组中已有就加入到重复数组中, 否则append到唯一数组中
1.In Python, strings are indexable and iterable, which means we can use indexing to select an individual character, and we can also iterate on the string using a for loop.