All Questions
4 questions
0
votes
1
answer
630
views
Calculating average in awk based on several column conditions in csv
I currently have the following csv format, it's much larger but I've taken a chunk of it for now.
EV,"Houston","-7.0"
AB,"Boston","19.0"
OO,"Mystic","13.0"
AB,"Boston","-12.0"
EN,"New York City","9....
0
votes
6
answers
271
views
Keep only a few digits of decimal part
I have a file whose contents look like this.
2,0,-1.8433679676403103,0.001474487996447893
3,1,0.873903837905657,0.6927701848899038
1,1,-1.700947426133768,1.5546514434152598
CSV with four columns ...
0
votes
1
answer
2k
views
Finding average excluding the first row
I have a csv file with many columns. I have computed average of a column using the command
awk -F',' '{sum+=$3} END {print sum/NR}' cpu.csv
But it does include the first row that has text fields ...
2
votes
2
answers
4k
views
Calculating average in awk based on column condition in csv
I have the following csv format. There are vals from the whole month, but I've chunked it:
2415.02,2203.35,00:17,25:May:2017,
3465.02,2203.35,01:17,25:May:2017,
2465.02,2203.35,12:17,26:May:2017,
465....