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
13
votes
2 answers

How to get 1D column array and 1D row array from 2D array? (C# .NET)

i have double[,] Array;. Is it possible to get something like double[] ColumnArray0 = Array[0,].toArray() and double[] RowArray1 = Array[,1].toArray() without making a copy of every elemet(using for)? Thanks.
Jose Kiwi
  • 133
  • 1
  • 1
  • 4
13
votes
7 answers

GridView: How to set the number of rows to display

I would like my grid view to display only 3 rows any ideas on how I can achieve this? Thanks
Jean Claude Abela
  • 782
  • 1
  • 9
  • 26
12
votes
3 answers

Converting a list of rows to a PySpark dataframe

I have the following lists of rows that I want to convert to a PySpark df: data= [Row(id=u'1', probability=0.0, thresh=10, prob_opt=0.45), Row(id=u'2', probability=0.4444444444444444, thresh=60, prob_opt=0.45), Row(id=u'3', probability=0.0,…
mblume
  • 243
  • 1
  • 3
  • 11
12
votes
2 answers

How to combine rows of record types in PureScript? (Is there any alternative to the Union typeclass in PureScript 0.12.0?)

Problem: I have different record types with many common fields. How could I "include" the common fields in the record type definitions? Example: newtype RecordType1 = RecordType1 { a :: Int, b :: Int, y :: String } newtype RecordType2 = RecordType2…
Digital Stoic
  • 1,229
  • 11
  • 20
12
votes
2 answers

Why reading rows is faster than reading columns?

I am analysing a dataset having 200 rows and 1200 columns, this dataset is stored in a .CSV file. In order to process, I read this file using R's read.csv() function. R takes ≈ 600 seconds to read this dataset. Later I got an idea and I transposed…
user2273202
12
votes
4 answers

stacking columns into 1 column in R

I have a data frame that looks like: ID Time U1 U2 U3 U4 ... 1 20 1 2 3 5 .. 2 20 2 5 9 4 .. 3 20 2 5 6 4 .. . . And I would need to keep it like: ID Time U 1 20 1 1 20 2 1 20 3 1 20 5 2 20 2 2 20 5 2 …
user2263330
  • 121
  • 1
  • 1
  • 3
12
votes
6 answers

CSS: Floating multiple elements with different heights on multiple rows?

I'm trying to organize divs into two columns, but not force them into rows. I'm also trying to keep the vertical spacing between the divs a constant. You can see the following demo, which would be correct if there wasn't huge amounts of vertical…
qwerty
  • 5,166
  • 17
  • 56
  • 77
12
votes
5 answers

get number of rows with pdo

I have a simple pdo prepared query: $result = $db->prepare("select id, course from coursescompleted where person=:p"); $result ->bindParam(':p', $q, PDO::PARAM_INT); $result->execute(); $rows = $result->fetch(PDO::FETCH_NUM); echo $rows[0]; the…
Smudger
  • 10,451
  • 29
  • 104
  • 179
11
votes
3 answers

Select rows from a Pandas DataFrame with same values in one column but different value in the other column

Say I have the pandas DataFrame below: A B C D 1 foo one 0 0 2 foo one 2 4 3 foo two 4 8 4 cat one 8 4 5 bar four 6 12 6 bar three 7 14 7 bar four 7 14 I would like to select all…
tinman248
  • 345
  • 1
  • 3
  • 10
11
votes
3 answers

Android TV Leanback RowsFragment keep focused item at the start

I'm working on a Leanback app and I've implemented the rows and everything via RowsFragment and its all working great. As for now when I go left and right within the items in the row the focused item moves to the middle of the screen and gains the…
Itay Feldman
  • 846
  • 10
  • 23
11
votes
2 answers

How to duplicate and modify table rows using Jooq insertInto

I'm using Jooq and am trying to generate a near copy of a data set within the same table. In the process I want to update the value of one field to a known value. I've been looking at the docs & trying variations with no luck yet. Here is my…
wholeroll
  • 193
  • 1
  • 10
10
votes
3 answers

iOS rainbow colors array

I am setting up an array that has a transition throughout he colors of the rainbow. Right now I've just manually entered the colors in the array but there are too many to manually type... as of now I just go from 0.25 to 0.5 to 0.75 to 1 and so on…
Albert Renshaw
  • 17,282
  • 18
  • 107
  • 195
10
votes
5 answers

IDataReader - Any way to get the total rows?

Is there any way to get the total number of rows returned from a SQL query (from the IDataReader) before iterating through the rows by using reader.Read();?
michael
  • 14,844
  • 28
  • 89
  • 177
10
votes
3 answers

how do you find and save duplicated rows in a numpy array?

I have an array e.g. Array = [[1,1,1],[2,2,2],[3,3,3],[4,4,4],[5,5,5],[1,1,1],[2,2,2]] And i would like something that would output the following: Repeated = [[1,1,1],[2,2,2]] Preserving the number of repeated rows would work too, e.g. Repeated…
Ben Bird
  • 374
  • 1
  • 5
  • 16
10
votes
3 answers

Printing 2 evenly populated lists side by side evenly

I'm using the following code to produce 2 lists, nameList and gradeList. nameList[] gradeList[] for row in soup.find_all('tr'): name = row.select('th strong') grade = row.select('td label') if grade and name: …
Jackson Blankenship
  • 475
  • 2
  • 7
  • 19