Questions tagged [columnsorting]

Column sorting refers to any columns based technique that sorts a list of data based on its individual column values.

Column sorting refers to any columns based technique that sorts a list of data based on its individual column values.

375 questions
3
votes
1 answer

Sorting DF by a column with multiple values

In my main df, I have a column that is combined with two other columns, creating values that look like this: A1_43567_1. The first number represents a type of assessment taken, the second number being an question ID, and the final number being the…
krisko08
  • 55
  • 7
3
votes
1 answer

How to verify the sorting(ascending and descending) functionality in casperjs

I am new to this framework and also not getting any idea how to test the sorting functionality with CasperJS. The scenario is, I need to verify the search results with sorting functionality. When i search with any keyword it displays all the…
Prateek.Naik
  • 573
  • 4
  • 18
3
votes
1 answer

How to build a sorted list of ranks from Cassandra table?

I store my data in a single Cassandra 2.0.10 table. There is one column (named score), type of integer, can take any values. I need to write a background job that would assign a value to another column, rank, giving value 1 for the row with the…
Audrius Meskauskas
  • 18,378
  • 9
  • 63
  • 78
3
votes
3 answers

How to remove sorting glyph in datagridview without removing Sorting facility

How can i remove sorting glyph from column headers in DataGridView without removing its sorting functionality. I am working on windows form application in C#, i want to generate report from a datagridview, where datagridview column width will assign…
2
votes
1 answer

How to modify/remove R rows that don't fit the regex pattern of the column?

Here is an example of my current column, as well as my desired replacement. Times <- c("12h00","16h30","Afternoon","15h00","14h20","7h30","06h00") Output: ["12","16",NA,"15","14","7","6"] I'm using a messy dataset right now, but I only…
norsynthz
  • 23
  • 3
2
votes
1 answer

Pandas rearrange data into columns of same values

I have a dataframe with unorganized data. df = pd.DataFrame({'id':['1', '2', '3', '4'], 'name':['Jon', 'Jack', 'Jane', 'Jill'], 'A':['C', 'A', 'E', 'B'], 'B':['', 'C', 'D', 'E',], 'C':['E',…
bLund
  • 55
  • 4
2
votes
1 answer

Divide year in quarters with ggplot2

First of all my data: dput(UmsatzImEinzelhandelQuartalsdaten[1:10,]) structure(list(Name = c("Baden-Württemberg", "Baden-Württemberg", "Baden-Württemberg", "Baden-Württemberg", "Baden-Württemberg", "Baden-Württemberg", "Baden-Württemberg",…
2
votes
2 answers

Pandas: How to Sort a Range of Columns in a Dataframe?

I have a Pandas dataframe that I need to sort by the data columns' maximum values. I am having trouble performing the sort because all of the sorting examples that I have found operate on all of the columns in the dataframe when performing the…
Bob
  • 21
  • 3
2
votes
2 answers

How can I split a specific column to new columns in Pandas?

I want to split "rest" column to new columns by comma and drop "R=". And also add +1 to "joints" column. How can i do? df joints rest 0 R=0,0,1,1,1,1 3 R=0,0,1,1,1,1 42 R=0,0,1,1,1,1 45 …
2
votes
1 answer

Is there a way to sort pandas columns by intersections with rows?

I have a pandas table with rows and columns and data in only some intersections between the rows and columns. See below: col1 col2 col3 col4 col5 row1 1 row2 1 1 row3 1 row4 1 1 row5 1 …
danvoronov
  • 49
  • 4
2
votes
1 answer

create generic data table using angular material

I want to create reusable angular material data table which can be used by any component and need to pass only required column header and other table data. Below is what I tried: I am following this example: stackblitz Created shared folder in…
2
votes
2 answers

How can I sort HTML table using Angular/Typescript without 3rd party?

So I have a html table where the rows and coloumns are interpolated from my User like his name, last login date, etc. Earlier we used Prime NG's customSort function but now we are eliminating those so I need to make my own sorting function. Can I…
kameholic1582
  • 65
  • 2
  • 8
2
votes
2 answers

Sorting individual columns of an array

Given an input array = [ [1,2,-1,-1,2], [3,-1,-1,-1,-1], [-1,-1,-1,3,2] ] I want to transform it into this: new_array = [ [-1,-1,-1,-1,-1], [1,-1,-1,-1,2], [3,2,-1,3,2] ] That is, for each column, I want elements to stay in their relative places,…
xyz-x
  • 145
  • 5
2
votes
2 answers

A function that allows referral to columns with both index and name

I tried to create an easier way to refer to columns with the function below, by allowing both indexes and names. See also link. So this one works: df <- data.table::fread("a b c d e f g h i j 1 2 3 4 5 6 7 8 9 10", …
Tom
  • 1,237
  • 8
  • 29
2
votes
2 answers

awk merging 2 columns and adding an extra column to txt file

I did this in the past without problems, but I can't this time and I don't understand why..... My original files is 1002 10214 1002 10220 1002 10222 1002 10248 1002 10256 I need to make a new file where the 2 columns…
esse
  • 31
  • 3
1
2
3
24 25