Reputation: 2051
I use this command:
import-csv my.csv | select Date, Balance | sort Balance | select -first 10
The Balance column is float data, but it is sorted as string. How to sort it as number?
Upvotes: 1
Views: 1019
Reputation: 60958
try:
import-csv my.csv | select Date, Balance | sort {[double]$_.Balance} | select -first 10
Upvotes: 2