10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello all,
I need to filter a dataframe composed of several columns of data to remove the duplicates according to one of the columns. I did it with pandas. In the main time, I need that the last column that contains all different data ( not redundant) is conserved in the output like this:
A ... (5 Replies)
Discussion started by: pedro88
5 Replies
2. Shell Programming and Scripting
hey,
i m having a hard time trying to print only the first occurrence between 2 idenicale strings.
for the following output:
please
help
me im a
noob
please
im a noob
help me
noob
please
help
me im a
noob
please
im a noob
help me
noob (3 Replies)
Discussion started by: boaz733
3 Replies
3. Shell Programming and Scripting
Dear all,
I need a little help. I am working on a frequency driven database in which the structure is as under:
headword=gloss<space>Frequency
The data which I am working with has dupes i.e. the Headword is repeated more than once with a different gloss variant on the right hand side and... (8 Replies)
Discussion started by: gimley
8 Replies
4. Programming
Seems not very post about R language. Here is one: How to grep a sublist of a list like grep -f in unix? say I have a dataframe
ID v1 v2 v3
A 1 3 4
B 4 5 6
C 7 8 9
D 1 3 4
E 1 3 3
F 2 4 5 and I only need
ID v1 v2 v3
A 1 3 4
C 7 8 9
E 1 3 3
F 2 4 5 by like
grep... (2 Replies)
Discussion started by: yifangt
2 Replies
5. SuSE
i have a problem in finding block of identical strings...i solved the problem in finding consecutive identical words and now i want to expand the code in order to find and remove consecutive identical block of strings...
for example the awk code removing consecutive identical word is:... (2 Replies)
Discussion started by: cocostaec
2 Replies
6. Programming
i have a problem in finding block of identical strings...i solved the problem in finding consecutive identical words and now i want to expand the code in order to find and remove consecutive identical block of strings...
for example the awk code removing consecutive identical word is:... (2 Replies)
Discussion started by: cocostaec
2 Replies
7. Shell Programming and Scripting
i have a problem in finding block of identical strings...i solved the problem in finding consecutive identical words and now i want to expand the code in order to find and remove consecutive identical block of strings...
for example the awk code removing consecutive identical word is:... (2 Replies)
Discussion started by: cocostaec
2 Replies
8. Shell Programming and Scripting
Hi. I'm hoping that someone can help me with a bash script to delete a block of lines from a file.
What I want to do is delete every line between two stings that are the same,
including the line the first string is on but not the second.
(Marked lines to match with !)
For example if I... (2 Replies)
Discussion started by: Zykr
2 Replies
9. Shell Programming and Scripting
I have a sorted file like:
Apple 3
Apple 5
Apple 8
Banana 2
Banana 3
Grape 31
Orange 7
Orange 13
I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found.
so the output would look like:
Apple 8 3
Banana... (2 Replies)
Discussion started by: dcfargo
2 Replies
10. Shell Programming and Scripting
I am looking to replace two or more strings on different lines using sed, but not with the same variable. IE
# cat xxx.file
<abc>
abc def ghi
abc def ghi
abc def ghi
currently I can only change each line with the same pattern:
# sed -e '/<abc>/!s/abc\(.*\)/jkl mno/' xxx.file
abc jkl mno... (3 Replies)
Discussion started by: prkfriryce
3 Replies