last day (15 days later) » 

9:38 AM
0
Q: Remove multiple header from csv file

Rajesh KumarI have a file with multiple headers , I want to removed the extra headers from file Actual file headers :

 
Please, please ! Do not post images of text. Or at minimum also post the text, so we can work with the data.
How are columns separated? with a tab? Is this a csv.? Is it a worksheet?
 
Rajesh you mention Excel. Does that mean this CSV file was created on a Windows system? That's something important to add to your question
Rajesh please provide a true sample of your data file. Pictures can't be copied and pasted to test our possible solutions. Don't use Excel to read the file; use something like head -n5 file.csv
Rajesh, finally (for now): are you working on a Linux-based system (i.e. GNU tools) or an actual UNIX system (i.e. POSIX tools)? If you don't know please add the output of uname -a to your question
 
Some of the stuff in the final picture looks like json not csv. What is this file?
 
@Kusalananda What was wrong with the text data added that you felt obligated to remove it?
 
@QuartzCristal As you yourself wrote just before I removed the data that you added to the question: " it seems to me that what the OP is seeing in Excel is a data connection to some database, not a text file". Also, if user has a file, we don't really know what it looks like, and your edit made it look like we knew it was a simple CSV file with commas as delimiters, which we don't.
 
9:38 AM
Yes, I wrote that (in my now erased answer, not here). But the OP itself accepted that data as correct. @Kusalananda
@Kusalananda It seems to me that you are missing something: I can not do edits (yet). I provided some text data, yes. I needed some text to test my answer (now erased because of the downvotes) so I though that the data could be useful to the next user that needed the data. Then, it was accepted by the OP (I got my 2 points for the accepted edit). So: assuming good faith: the OP did acknowledge that the data was useful/valid/correct and should be retained. Or, assuming bad faith: the OP didn't review the data and just accepted it without actually making any effort to review it. Cont...
Are you assuming bad faith here ? Bad faith on my part for giving some data that (hopefully) would be useful to someone else. Are you thinking that I tried to damage the question somehow? How could I if anything I choose to edit has to be accepted by a team of reviewers ?. Or ... bad faith on the part of the OP because he accepted some incorrect data. I fail to understand what happened. @Kusalananda
Also, first comment from the OP in my now erased answer: Unix csv it is @Kusalananda
 
It seemed to me as if your edits to the question may have blocked further edits, and were accepted by the OP in an effort to allow them to add the further images that they added with their subsequent edit, not as a statement saying "yes, this is what my actual data looks like". If you feel you have been ill-treated by me and if you, like you insinuate, believe that I have broken the code of conduct, then do not hesitate to contact a community manager, or bring it up in a post on our Meta site. See also unix.stackexchange.com/contact
 
Why the escalation to stronger measures? @Kusalananda
I am not insinuating anything, I am plainly stating what I am thinking, candidly if you wish. @Kusalananda
But it seems now that I have hurt your feelings somehow. Then, what was difficult for me to understand has become now something that is impossible to understand and learn for future situations. @Kusalananda
In any case, feel free to act as you wish, you would act on your feelings anyway, no matter what I might argue, will you not? @Kusalananda
If you really believed that the OP accepted an edit to be able to make his own edits, shouldn't you have asked him if the text data was correct? Not act in your own opinion. @Kusalananda
 

last day (15 days later) »