Questions tagged [rows]

A row is a single data item in a database, spreadsheet, table, grid or list. When using this tag, please also add additional tags to clarify your specific environment/language/use case.

A row is a single data item. In the context of a database or similar data structure, it's also known as a or and will have a well-defined structure. In the context of a dataset in data science, each row represents an observation.

Rows can also be added to a less structured data source, such as a , , grid or .

4419 questions
18
votes
7 answers

Laravel insert or update multiple rows

Im new in laravel, and im trying to update my navigation tree. So i want to update my whole tree in one query without foreach. array( array('id'=>1, 'name'=>'some navigation point', 'parent'='0'), array('id'=>2, 'name'=>'some navigation point',…
Mateusz Kudej
  • 447
  • 1
  • 8
  • 23
17
votes
2 answers

Alternating row color for JasperReports

I want to get color to alternate for the rows in a JasperReports subreport. I have all rows with the same background color but I want it to alternate. Can this be done?
user726478
17
votes
3 answers

How to delete groups containing less than 3 rows of data in R?

I'm using the dplyr package in R and have grouped my data by 3 variables (Year, Site, Brood). I want to get rid of groups made up of less than 3 rows. For example in the following sample I would like to remove the rows for brood '2'. I have a lot…
Keeley Seymour
  • 281
  • 3
  • 10
17
votes
2 answers

Excel Create Collapsible Indented Row Hierarchies

I would like to create indented collapsible row hierarchies in Excel for my spreadsheet. I have used group function but that becomes hard to manage for me. Here is an example of what I am trying to create: https://www.youtube.com/watch?v=CBJY83PTiXs
user2533460
  • 349
  • 3
  • 7
  • 20
16
votes
7 answers

Converting Columns into rows with their respective data in sql server

I have a scenario where I need to convert columns of table to rows eg - table - stocks: ScripName ScripCode Price ----------------------------------------- 20 MICRONS 533022 39 I need to represent the table in the…
Ish Tech
  • 239
  • 1
  • 2
  • 12
16
votes
5 answers

Collapse rows with overlapping ranges

I have a data.frame with start and end time: ranges<- data.frame(start = c(65.72000,65.72187, 65.94312,73.75625,89.61625),stop = c(79.72187,79.72375,79.94312,87.75625,104.94062)) > ranges start stop 1 65.72000 79.72187 2 65.72187 …
Liza
  • 1,066
  • 2
  • 16
  • 26
16
votes
1 answer

Drag down formula and change ROW references instead of COLUMNS

In excel I have sheet1 contains total every month. (please see image below) Then in my sheet2 it will display horizontally. (please see image below) I used the formula =Sheet1!$B$1, my problem is when i drag it to the right it increments the…
rayncorg
  • 963
  • 4
  • 16
  • 33
15
votes
6 answers

How to get number of rows by select query using mysql

I'm new in golang. I want to create a login verification from MySQL db. I want a method like as in PHP mysqli_num_rows($res) == 1... I tried len(rows) or rows.Column() @fmt.Println("No of rows are :", rows) but it won't... The code which i tried ...…
Sohail Shaikh
  • 215
  • 1
  • 4
  • 10
15
votes
2 answers

Pandas - Delete Rows with only NaN values

I have a DataFrame containing many NaN values. I want to delete rows that contain too many NaN values; specifically: 7 or more. I tried using the dropna function several ways but it seems clear that it greedily deletes columns or rows that contain…
Slavatron
  • 2,278
  • 5
  • 29
  • 40
14
votes
5 answers

How to transfer the data of columns to rows (with awk)?

I have a file like this: n A B C D 1 01 02 01 01 2 02 02 01 01 and I want to transfer the columns by rows, so the output should be like this: n 1 2 A 01 02 B 02 02 C 01 01 D 01 01 I have wrote this command: awk '{ for (i=1;i<=NF;i++ ) printf $i…
mahmood
  • 1,203
  • 5
  • 16
  • 27
14
votes
3 answers

jQuery - Edit a table row inline

I have a table with arbitrary columns and rows. This fact is irrelevant though really, all I want to do is develop a function that will turn a row (or multiple rows) into a series of text inputs containing the data in the table (or empty if no data…
adam
  • 22,404
  • 20
  • 87
  • 119
14
votes
1 answer

Why, if MATLAB is column-major, do some functions output row vectors?

MATLAB is well-known for being column-major. Consequently, manipulating entries of an array that are in the same column is faster than manipulating entries that are on the same row. In that case, why do so many built-in functions, such as linspace…
jub0bs
  • 60,866
  • 25
  • 183
  • 186
13
votes
6 answers

Select the first 150 rows, then the next 150 and so on?

How can I select in oracle sql in a Table the first x rows, then the next x and so on? I know I could use TOP/LIMIT, then I get the first x select a from b limit 150 => get the first 150 rows. Edit: Why? I would like to copy the first 150 outputs…
sabisabi
  • 1,501
  • 5
  • 22
  • 40
13
votes
3 answers

MySQL - Sum only if all rows are not null, else return null

Let's suppose the following table: X VALUE 1 2 1 3 2 NULL 2 4 I want a result set grouped by X with the sum of VALUE, but only if all the rows related to each X value are not null. Using the same example, the result must be: X …
user3418803
  • 189
  • 1
  • 7
13
votes
2 answers

Combine multiple rows into one row MySQL

Say I have two tables in a MySQL Database. Table 1: ID Name 1 Jim 2 Bob 3 John Table 2: ID key value 1 address "X Street" 1 city "NY" 1 region "NY" 1 country "USA" 1 …
n0nnus
  • 133
  • 1
  • 1
  • 4