Skip to content

How to force field type? #397

Answered by jqnatividad
aborruso asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @aborruso ,

You have access to all of Lua's functions with qsv.

So for your issue, you can just call tonumber() to convert Population.

$ qsv lua filter 'tonumber(Population) > 7' input.csv
[00:00:00] [========================= 100% of 9 records] (5,642/sec)
Lat,Lon,Population
44.41486111114664,8.955138888896052,39.973810894449336
44.382361111146615,9.068750000007254,7.407975662240021
44.383750000035505,9.069027777785033,7.407975662240021

There are more advanced examples of the qsv lua command here.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aborruso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants