I have 3 columns separated by commas as shown below(column1,column2,column3). In the below example the "241682-27638-USD-OCOF" is not repeating so the count is one, "241942-37190-USD-DIV" is repeated twice so the count is 2 and so on.
column1,column2,column3 ,occcurance_count_of_column3
name1,empId1,241682-27638-USD-CIGGNT ,1
name2,empId2,241682-27638-USD-OCGGINT ,1
name3,empId3,241942-37190-USD-GGDIV ,2
name4,empId4,241942-37190-USD-CHYOF ,1
name5,empId5,241942-37190-USD-EQPL ,1
name6,empId6,241942-37190-USD-INT ,1
name7,empId7,242066-15343-USD-CYJOF ,3
name8,empId8,242066-15343-USD-CYJOF ,3
name9,empId9,242066-15343-USD-CYJOF ,3
name10,empId10,241942-37190-USD-GGDIV ,2
name11,empId11,242066-33492-USD-CJHOF ,1
I have column1,column2,column3 in a CSV file. I want to have the occcurance_count_of_column3 as the next column.I want to check whether the element in column3 repeats and how many times(occcurance_count). And print count of occurrence in the same CSV file using Python.