I want to be able to delete columns whose data have more than 10 percent of NAs.
so in this case i will delete x4.
lets say there are 100 tables with 500 columns each.
So I want to write 2 loops to extract and delete the columns with NAs.
Can you give me a hand?
Thanks
Last edited by Franklin52; 06-07-2012 at 03:58 AM..
Reason: Please use code tags for data and code samples
Hi Friends,
I want to delete specific columns from a file.
Say my file content is as follows:
"1","a","ww1",1234"
"2","b","wwr3","2222"
"3","c","erre","3333"
Now i want to delete the column 2 and 4 from this file.
That is I want the file content to be:
"1","ww1"
"2","wwr3"... (11 Replies)
Hi All,
Am working on perl script which should delete columns in existing CSV file.
If my file is :
AA,BB,CC,DD
00,11,22,33
00,55,66,77
00,99,88,21
AA,BB... are all my headers can come in any order (e.g AA,CC,BB...) and rest are values. I want to delete column CC...
Can anybody help... (2 Replies)
Hi,
I want to delete rows that dont have a certain # of columns. In my case, rows that are less than 8 should be removed (those greater than 8 are ok).
For instance:
1 2 3 4 5 6 7 8
2 3 2 4 3 2 1 5
1 2 3 4 5 6 8
2 2 4 3 1
1 1 1 1 1 1 1 1
after:
1... (8 Replies)
Dear specialists out there, please help a poor awk newbie:
I have a very huge file to process consisting of 300000 columns and 1500 rows. About 20000 columns shall be deleted from that file. So it is clear, that I can't do this by writing down all the columns in an awk command like $1, $x etc.... (5 Replies)
I have a text file that looks like this:
1 rs523634 8.22486
1
1 rs585160 8.22488
1 rs497228 8.2249
1
1 rs600933 8.225
1 rs480106 8.22531
1 rs600199 8.22533
1 rs529015 8.22534
1 rs598894 8.22534
I want to delete the rows with empty... (2 Replies)
Hi All,
i have a .Csv file in the below format
startTime, endTime, delta, gName, rName, rNumber, m2239max, m2239min, m2239avg, m100016509avg, m100019240max, metric3min, m100019240avg, propValues
11-Mar-2012 00:00:00, 11-Mar-2012 00:05:00, 300.0, vma3550a, a-1_CPU Index<1>, 200237463, 0.0,... (9 Replies)
Hi all,
I am trying to delete columns in a file using a script. The columns that need to be deleted are passed as arguments to the script.
The script should look like this
> delete_columns.sh <file_name.txt> <column_numbers_to_be_deleted>
The contents of the file_name.txt will be like ... (5 Replies)
Hi folks,
How awk 'll help to do this file contains bunch of insert statement like below remove fourth column from all statement put it in new file
INSERT INTO `tbl_medicalquestions` VALUES (1,'Is anyone waiting for an operation, post operative check up, any other hospital treatment or... (12 Replies)
Hi group,
Can you please tell how to delete specific columns from a file.
I know something like
awk -F, '{ print $1" "$2" "15 }' input.txt > output.txt will delete all other columns. But this is in a way to copy some particular columns.
But is there any other way to select just some... (11 Replies)
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)