Here is the file input: File Input
Using the above file, how I can count the line occurences in a csv file using pandas and write in another file with the count appended? and should remove the rest duplicate lines.
For example:
0 1 1 1 -1 -1 -1 1 yesno
0 1 -1 -1 1 1 1 -1 no
0 1 -1 -1 -1 -1 -1 -1 yes
0 1 1 1 -1 -1 -1 1 yesno
1 0 1 1 -1 -1 -1 1 yesno
1 0 1 1 1 -1 -1 -1 yesno
1 0 1 1 1 -1 -1 -1 yesno
0 1 1 1 -1 -1 -1 1 yesno
0 1 -1 -1 1 1 1 -1 no
0 1 -1 -1 -1 -1 -1 -1 yes
0 1 1 1 -1 -1 -1 1 yesno
1 0 1 1 -1 -1 -1 1 yesno
1 0 1 1 1 -1 -1 -1 yesno
1 0 1 1 1 -1 -1 -1 yesno
Output should be
0 1 1 1 -1 -1 -1 1 yesno 2
0 1 -1 -1 1 1 1 -1 no 2
0 1 -1 -1 -1 -1 -1 -1 yes 2
0 1 1 1 -1 -1 -1 1 yesno 2
1 0 1 1 -1 -1 -1 1 yesno 2
1 0 1 1 1 -1 -1 -1 yesno 2
1 0 1 1 1 -1 -1 -1 yesno 2
yesno/no/ etc final column included in determining a repeat?