Skip to content

Refactor/sort#28

Merged
kishyassin merged 2 commits into
kishyassin:mainfrom
cs168898:refactor/sort
Dec 29, 2025
Merged

Refactor/sort#28
kishyassin merged 2 commits into
kishyassin:mainfrom
cs168898:refactor/sort

Conversation

@cs168898

Copy link
Copy Markdown
Collaborator

Sort method refactorization

  • Refactored sortValues method to handle multiple columns, used for tie breaking columns.
  • Refactored sortValues method to handle Nil value scenarios.

Example Syntax:

colNames := []string{"score", "score2"}
df.SortValues(colNames, ascending)

where colNames is the slice of columns to sort by.

Important things to note**

  • Nil value rows will be pushed to the last row of the dataframe.
  • Each time the values are identical, it will move onto the next column to compare provided in the slice.

#26

Added multicolumn sorting to enable tie breakers and nil value sorting to push nil valued rows to the last row of the dataframe
The multiple columns test will test to see if the multi column logic works where if 2 values are the same, then look at the second column to tie break. The nil value test is to test the nil value handling logic where we push the nil value'd row to the end of the dataframe
@kishyassin kishyassin merged commit b0c6e60 into kishyassin:main Dec 29, 2025
1 check passed
@cs168898 cs168898 added this to the sort milestone Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants