List only duplicate values of column and count instances of .csv file in UNIX
I need to take any one of the column of a .csv file and count the number of instances of each not unique value in that column. I'd like the output to be value,count sorted by most instances. Thanks for any guidance!
Hi all,
I have a huge csv file with the following format of data,
Num SNPs, 549997
Total SNPs,555352
Num Samples, 157
SNP, SampleID, Allele1, Allele2
A001,AB1,A,A
A002,AB1,A,A
A003,AB1,A,A
...
...
...
I would like to write out a list of unique SNP (column 1). Could you... (3 Replies)
Hi
I have the following info in a file -
<Cell id="25D"/>
<Cell id="26A"/>
<Cell id="26B"/>
<Cell id="26C"/>
<Cell id="27A"/>
<Cell id="27B"/>
<Cell id="27C"/>
<Cell id="28A"/>
I would like to know how would you go about counting all... (4 Replies)
I need to take the second column of a .csv file and count the number of instances of each unique value in that same second column. I'd like the output to be value,count sorted by most instances. Thanks for any guidance!
Data example:
317476,317756,0
816063,318861,0
313123,319091,0... (4 Replies)
Hello,
I need some sort of way to extract every date contained in a file, and count how many of those dates there are.
Here are the specifics:
The date format I'm looking for is mm/dd/yyyy
I only need to look after line 45 in the file (that's where the data begins)
The columns of... (2 Replies)
Hi, I have tab-deliminated data similar to the following:
dot is-big 2
dot is-round 3
dot is-gray 4
cat is-big 3
hot in-summer 5
I want to count the frequency of each individual "unique" value in the 1st column. Thus, the desired output would be as follows:
dot 3
cat 1
hot 1
is... (5 Replies)
cat sample.csv
ID,Name,no
1,AAA,1
2,BBB,1
3,AAA,1
4,BBB,1
cut -d',' -f2 sample.csv | sort | uniq
this gives only the 2nd column values
Name
AAA
BBB
How to I get all the columns of CSV along with this? (1 Reply)
Hi Folks,
I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,.
... (4 Replies)
Hello Team,
I need your help on the following:
My input file a.txt is as below:
3330690|373846|108471
3330690|373846|108471
0640829|459725|100001
0640829|459725|100001
3330690|373847|108471
Here row 1 and row 2 of column 1 are identical but corresponding column 2 value are... (4 Replies)
What is an efficient way of counting the number of unique values in a 400 column by 1000 row array and outputting the counts per column, assuming the unique values in the array are:
A, B, C, D
In other words the output should look like: Value COL1 COL2 COL3
A 50 51 52... (16 Replies)
Discussion started by: Geneanalyst
16 Replies
LEARN ABOUT DEBIAN
tracertstats
TRACERTSTATS(1) User Commands TRACERTSTATS(1)NAME
tracertstats - perform simple filter based analysis on a trace
SYNOPSIS
tracertstats [ -f | --filter bpf ] [ -i | --interval interval ] [ -c | --count count ] [ -o | --output-format csv,txt,png,html ] [ -m |
--merge-inputs ] inputuri...
tracertstats -H|--libtrace-help
DESCRPTION
tracertstats takes a list of bpf expressions and outputs the number of packets and bytes that match that expression every interval seconds,
or count packets.
-f bpf-filter
--filter bpf-filter
Add another "bpf filter"
-i interval
--interval interval
Output results every interval seconds.
-c count
--count count
Output results every count packets.
-m
--merge-inputs
Treats all inputs as a single input, resulting a single unified output rather than an output for each input. Works best with traces
that are consecutive to create a single CSV, for instance.
-o format
--output-format format
Selects the output format.
txt Human readable text. This is the default output format which provides output easily understood by a human. This format has
the disadvantage that it takes up quite a bit of horizontal space.
csv Comma Seperated Values. This is suitable for further analysis in a spreadsheet, or other program.
png PNG Graphic. Produces a fairly incomprehensible png graph. This relies on gdc being available at compile time.
html This produces output suitable for display to a human in a webbrowser.
EXAMPLES
tracertstats --filter 'host sundown'
--filter 'port http'
--filter 'port ftp or ftp-data'
--filter 'port smtp'
--filter 'tcp[tcpflags] & tcp-syn!=0'
--filter 'not ip'
--filter 'ether[0] & 1 == 1'
--filter 'icmp[icmptype] == icmp-unreach'
--output-format html
erf:/traces/trace1.gz
erf:/traces/trace2.gz
LINKS
More details about tracertstats (and libtrace) can be found at http://www.wand.net.nz/trac/libtrace/wiki/UserDocumentation
SEE ALSO libtrace(3), tracemerge(1), tracesplit(1), tracesplit_dir(1), tracefilter(1), traceconvert(1), tracereport(1), tracepktdump(1),
traceanon(1), tracesummary(1), traceconvert(1), tracereplay(1), tracediff(1), traceends(1), tracetopends(1)AUTHORS
Perry Lorier <perry@cs.waikato.ac.nz>
tracertstats (libtrace) November 2006 TRACERTSTATS(1)