Questions tagged [row]

A horizontal line of cells in a spreadsheet, SQL table, HTML table, or similar structure.

A row most commonly refers to a horizontal line of cells in a spreadsheet or similar structure.

7733 questions
1
vote
2 answers

need to find the consecutive rows where the status is AV prior to VL but receiving a missing SELECT

I am trying to retrieve consecutive rows where the ls_status is appearing in this order per letter eg i want to see the entries where status 'AV' is occurring prior 'VL' in my case i need to see rows 17 and 18 in my results…
1
vote
2 answers

Adding 2 rows with 0s at the start and end of pandas dataframe

I have a pandas Dataframe named dataframe. I want to add two rows at the start and end of the data frame with 0s. #create DataFrame df_x = pd.DataFrame({'logvalue': ['20', '20.5', '18.5', '2', '10'], 'ID': ['1', '2', '3', '4',…
Niro Mal
  • 127
  • 7
1
vote
1 answer

Selecting specific row based on user input CSV reader

i'm new to python so sorry if this seems stupid: i'm trying to make a program where the user input can ask the program a "station" and it returns/print the right line. So, for example, this is my code: import csv station = input("Station...…
1
vote
2 answers

Only keep the characters in front of "_" per row in a single column then create a new column with the output

I have a large data frame called data_frame with two columns PRE and STATUS that look like this: PRE STATUS 1_752566 GAINED 1_776546 LOST 1_832918 NA 1_842013 LOST 1_846864 GAINED 11_8122943 NA 11_8188699 GAINED 11_8321128 …
1
vote
3 answers

R - remove rows from data frame that do not match (exactly) elements of list

Imagine a data frame... df <- rbind("A*YOU 1.000 0.780", "A*YOUR 1.000 0.780", "B*USE 0.800 0.678", "B*USER 0.700 1.000") df <- as.data.frame(df) df ... which prints... > df V1 1 A*YOU 1.000 0.780 2 A*YOUR 1.000 0.780 3 B*USE…
CNiessen
  • 89
  • 6
1
vote
1 answer

R - how to add spaces to last row elements in dataframe after line

Imagine a data frame... df <- rbind("title", "------------------", "quite long content", "quite long content", "------------------", "short cont", "short cont") df <- as.data.frame(df) df ...which prints: > df V1 1 …
CNiessen
  • 89
  • 6
1
vote
2 answers

Multiply all possible combinations for rows

Hi I have a similar problem in Google sheets that is solved in this thread: Generate all possible combinations for Columns(cross join or Cartesian product) What I'm looking for is instead of combining the columns, multiply one numbers in each row…
1
vote
2 answers

Replace rows in an MxN matrix with numbers from 1 to N

Im interested in replacing all of my rows in an MxN matrix with values from 1 to N. For example: [[4,6,8,9,3],[5,1,2,5,6],[1,9,4,5,7],[3,8,8,2,5],[1,4,2,2,7]] To: [[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]] I've tried using loops…
NoahRyu
  • 13
  • 3
1
vote
1 answer

gnuplot: How to add a new colored curve every nth row while removing intermediate headers?

I've got a file which has this structure: Header 1 Header 2 config X Y 0.0 -5 -2 0.0 0 1 0.0 5 4 Header2 Config X Y 1.0 -5 -1 1.0 0 0 1.0 5 5 Header2 Config X Y 2.0 -5 0 2.0 0 1 2.0 5 6 Using gnuplot, I would like to plot columns 2:3 (Y as a…
1
vote
1 answer

Why is df.drop dropping more rows than it should

I have a data frame (other_team_df) of premier league teams and I want to drop rows where the home team is either: Arsenal, Chelsea, Liverpool, Tottenham, Man City or Man United. When I run the code below, del_row_index has length=1596 and…
1
vote
2 answers

How can I manage alignment with multiple rows and columns?

I'm trying to make a card with some elements. However it is hard to locate elements in right place with multiple rows and columns. I tried with mainAxisAlignment, crossAxisAlignment, SizedBox, Expanded and so on. Especially using Expanded make my…
yunju
  • 13
  • 5
1
vote
1 answer

How to flip two consective rows in a dataframe that includes rows of NAs?

I have this dataframe (but very big that includes many rows in the name variable that hold the values yes and no) df = data.frame(name = c('a','b','c',NA,NA,'yes','no',NA,NA,'f','g','h'), Freq = c(10,20,70,NA,NA,40,60,NA,NA,80,10,10)…
Anas116
  • 797
  • 2
  • 9
1
vote
1 answer

Сoncatenate rows in pandas with conditions and calculations

If I have a dataframe: myData = {'start': [1, 2, 3, 4, 5], 'end': [2, 3, 5,7,6], 'number': [1, 2, 7,9, 7] } df = pd.DataFrame(myData, columns=['start', 'end', 'number']) df And I need to do something like: result =…
Nik
  • 11
  • 2
1
vote
1 answer

Summarize values between two rows, according to criteria

I have this dataframe my dataframe where values in the 'Age' columns need to be summarize per the whole size range i.e. now the data frame is like this: Size Age 1 Age 2 Age 3 [1] 8 2 8 5 [2] 8.5 4 7 …
1
vote
1 answer

Adding row to binded dataview

I am in need to add row to the dataview My code is as follows DataGridViewSelectedRowCollection row = dataGridView1.SelectedRows; for (int o = 0; o < row.Count; o++) { DataRow myRow; myRow = (row[o].DataBoundItem as DataRowView).Row; …
Roland
1 2 3
99
100