I am new to Python. I am trying to find a simple way of getting a count of the number of elements repeated in a file(of first column)
e.g file contain the following list(-First column contain IP address)
10.2.1.12 2 4
192.12.23.2 3 5
10.2.1.12 1 2
192.11.23.1 3 5
10.2.1.12 4 5
192.12.23.2 1 6
Output:
IP Address count( number of repeated of 1st column)
10.2.1.12 3
192.12.23.2 2
192.11.23.1 1
e.g file contain the following list(-First column contain IP address)
10.2.1.12 2 4
192.12.23.2 3 5
10.2.1.12 1 2
192.11.23.1 3 5
10.2.1.12 4 5
192.12.23.2 1 6
Output:
IP Address count( number of repeated of 1st column)
10.2.1.12 3
192.12.23.2 2
192.11.23.1 1
Comment