Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
csvsortcan currently sort every selected column in the same direction, but cannot sort one column ascending and another descending. This adds a~prefix for descending column identifiers, socsvsort -c 'state,~total' data.csvsorts by state ascending and total descending within each state. The prefix also works on ranges;--reverseflips every direction.The comparison keeps the existing type inference, null ordering, case-insensitive sorting, and stable order for ties. On Windows,
csvsortnow keeps--columnsvalues literal so a leading~is not expanded as a home directory path. An exact column name beginning with~still selects that column as before.Refs #931.
Validation:
6d19c625) withColumnIdentifierError, then passed after the change.PYTHONUTF8=1 python -m pytest -q --disable-warnings: 360 passed, 31 subtests passed.flake8 csvkit tests,isort csvkit tests --check-only,check-manifest, andgit diff --check: passed.This contribution was implemented and verified by Codex AI on behalf of Rober1208. It has not had an independent human code review.