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
1
vote
0 answers

select multiple rows on nested condition in mysql database

select multiple rows on nested condition and nested limit in mysql database Actually i have one table like: id name levels 1 Red 1 2 Red Light 1 3 Green 2 4 Green Light 2 5 Blue 3 6 Blue Light 3 7 Blue…
Shailesh
  • 33
  • 7
1
vote
2 answers

Deleting rows in excel sheet once a criteria is matched in column

My data looks like this. I would like to delete rows where the value in column named Position from first has value 1. I wrote a macro to do that which is like this Sub DEL_row() row_number = 2 Do DoEvents row_number = row_number +…
payal arya
  • 11
  • 1
1
vote
3 answers

How to write data onto csv file over a loop in python

I want to write data onto several rows in a csv file. With this code I am only getting a single line written onto file. Need help. for i in range(1,10): with open("output.csv",'wb') as f: writer = csv.writer(f, dialect='excel') …
Rakesh Nittur
  • 445
  • 1
  • 7
  • 20
1
vote
1 answer

Remove specific rows from a structure

I have a 1x1 structure (EEG) with 42 fields. One of these fields is called event and is a 1x180 structure, with 13 different fields, some of which are strings and some numeric values. The 4th field of EEG.event is type and it contains strings (i.e.…
dede
  • 1,129
  • 5
  • 15
  • 35
1
vote
4 answers

What is the safest way to merge 2 table rows in SQL Server?

I have a table called [Sectors], which stores industry sectors. [SectorId] is defined as an INT and is the primary key of this table. These sectors are referenced throughout the database using the primary key, but there are no foreign key…
Saajid Ismail
  • 8,029
  • 11
  • 48
  • 56
1
vote
1 answer

Postgresql select, show fixed count rows

Simple question. I have a table "tablename" with 3 rows. I need show 5 rows in my select when count rows < 5. select * from tablename +------------------+ |colname1 |colname2| +---------+--------+ |1 |AAA | |2 |BBB | |3 …
Šerg
  • 793
  • 5
  • 18
1
vote
2 answers

adding values to a column by order pandas python

I have a dataset which i read in by data = pd.read_excel('....\data.xlsx') data = data.fillna(0) and i made them all strings…
Jessica
  • 2,923
  • 8
  • 25
  • 46
1
vote
1 answer

iterate through rows on condition pandas python

I have an excel table that i read in by data = pd.read_excel('..data.xlsx') Block Concentration Name Replicate Value 1 100 A 1 1446 1 100 A 2 25 1 100 …
Jessica
  • 2,923
  • 8
  • 25
  • 46
1
vote
3 answers

SQL convert data from columns into one row

I have a table in SQL that looks like: name age apples banana kiwi mary 5 R3.00 null null mary 5 null null r6.00 mary 5 null r9.50 null joane 8 null r9.60 null joane 8 r5.00 null null I need to convert it to: name …
Miss R
  • 23
  • 6
1
vote
2 answers

Swaping 2 rows in matrix c++

So I have this homework, to print a matrix with 3 rows and 4 colums so far that I manage to do it somehow(mostly by reading this forum), since our profesor in University won't explain how this things are done. So cut to the point. My code looks like…
Nikola
  • 53
  • 7
1
vote
1 answer

Merge rows in one data.frame

This is a very similar question to merge-two-rows-in-one-dataframe but I have string variables and just want to collapse some rows that have the same country name. I adapted the MWER data<-data.frame(code= c(345, 346), name= "Yemen", v1= c("",…
Max M
  • 806
  • 14
  • 29
1
vote
1 answer

Programmatically add new row to WPF DataGrid

I'm trying to add new rows to a DataGrid on a WPF application when clicking on a specific button. This is what I tried so far: DataGridRow row = new DataGridRow(); table.Items.Add(row); // table = my DataGrid When I run this code, it throws a…
92AlanC
  • 1,327
  • 2
  • 14
  • 33
1
vote
3 answers

delete rows in matrix under conditions in matlab

My program creates a matrix that the values of the cells in several rows are the same in the corresponding columns. I want to delete some of these rows in order to filter the matrix. To clarify, my matrix has the following form, A=[ 1 2 3 4 1 2…
vasouli
  • 21
  • 8
1
vote
3 answers

Average sequence rows MATLAB one column at a time

I have an array of data that is in variable m1 that is a 288 X 13 array. I need to average 24 rows in sequence 12 times for each column. I have tried many times to use this index we by calculating an average but I'm getting incorrect answers. My…
user2100039
  • 1,280
  • 2
  • 16
  • 31
1
vote
1 answer

SQL Remove Duplicate Records

I have the following query: SELECT CAST(t. NAME AS CHAR(12)) AS [ TABLE ], CAST(c. NAME AS CHAR(20)) AS [ COLUMN ], CAST(d. NAME AS CHAR(9)) AS [ DATA type ], CASE WHEN d. NAME IN ('char', 'varchar') THEN STR (c.max_length, 6, 0) …
jungkookie
  • 35
  • 7