Merging strings that have identical rownames in a dataframe
Hi
I have a data frame with repeated names in column 1, and different descriptors in column 2. I want to merge/cat strings that have same entry in column 1 into one row with any separator.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
wml::std::grid
wml::std::grid(3) EN Tools wml::std::grid(3)NAME
wml::std::grid - Layout Grid
SYNOPSIS
#use wml::std::grid
<grid [attributes]>
<cell [attributes]>...</cell>
:
<cell [attributes]>...</cell>
</grid>
DESCRIPTION
The "<grid>" container tag provides a mixture between a HTML table and a TeX-like way of specifying its dimensions and the alignment of its
cells.
ATTRIBUTES
First the possible attributes for "<grid>":
"summary"
This attribute will be inserted into the "table" tag, see documentation of HTML 4.0 for details on why this attribute is recommended.
"layout"
This specifies the layout of the grid in X and Y dimension, i.e. "3x2" means 3 columns (x-dimension) and 2 rows (y-dimension). Default
is "1x"NCELL where NCELL is the number of cell tags or in other words: Default is a top-down list.
"align"
This specifies the horizontal alignment of the cells in a row. The argument has to contain as many characters as there are cells in a
row. The supported alignment characters are `"l"' (left), `"r"' (right) and `"c"' (center). Default is `"l...l"' (as much "l"'s as
there are cells in a row).
"valign"
This specifies the vertical alignment of the cells in a column. The argument has to contain as many characters as there are cells in a
column. The supported alignment characters are `"t"' (top), `"b"' (bottom) and `"m"' (middle). Default is `"t...t"' (as much "t"'s as
there are cells in a column).
"width"
This is the corresponding attribute of the HTML "<table>" tag. Use it to set the width of the grid. Default is no specified width.
"spacing"
This is the corresponding attribute to "cellspacing" of the HTML "<table>" tag. Use it to set the spacing of cells in the grid, i.e.
the space around the content of each cell. Default is 0 (no space).
"padding"
This is the corresponding attribute to "<cellpadding>" of the HTML "<table>" tag. Use it to set the padding between cells in the grid,
i.e. the inter-cell space. Default is 0 (no space).
"border"
This is the corresponding attribute of the HTML "<table>" tag. Use it to set the border width of the grid. Default is 0 (no border).
"bgcolor"
This is the corresponding attribute of the HTML "<table>" tag. Use it to set the background color of the grid. Default is no specified
color.
"color"
This sets the foreground (text) color of the grid's contents. Actually this sets the default for the same attribute of "<cell>".
Default is no specified color.
Second the possible attributes for "<cell>":
"align"
This is the corresponding attribute of the HTML "<td>" tag. Use it to set the horizontal alignment of the cell's contents. Default is
taken from the same attribute of "<grid>".
"valign"
This is the corresponding attribute of the HTML "<td>" tag. Use it to set the vertical alignment of the cell's contents. Default is
taken from the same attribute of "<grid>".
"bgcolor"
This is the corresponding attribute of the HTML "<td>" tag. Use it to set the background color of a particular cell. Default is no
specified color.
"color"
This sets the foreground (text) color of the cell's contents. This is done via the HTML "<font>" tag. Default is no specified color
or the color from the same attribute of "<grid>".
"rowspan"
This is the corresponding attribute of the HTML "<td>" tag. Use it to span a cell over more then one row of the grid. Default is 1 row.
"colspan"
This is the corresponding attribute of the HTML "<td>" tag. Use it to span a cell over more then one column of the grid. Default is 1
column.
"width"
This is the corresponding attribute of the HTML "<td>" tag. Use it to set the width of the cell. Default is no specified width.
"height"
This is the corresponding attribute of the HTML "<td>" tag. Use it to set the height of the cell. Default is no specified height.
EXAMPLE
<grid bgcolor="#000000" color="#ffffff"
layout="3x2" align="llr" valign="tm">
<cell>A</cell> <cell>B</cell> <cell>C</cell>
<cell>D</cell> <cell>E</cell> <cell>F</cell>
</grid>
AUTHOR
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
REQUIRES
Internal: P1, P2, P3, P5
External: --
SEE ALSO
HTML <"table">-tag.
EN Tools 2014-04-16 wml::std::grid(3)