> How do you sort distances to prepare for nearest neighbor when the results
> returned look like this from the below statements?
It's unclear what you're asking.
1. Are you showing us the file content in the raw form:
> Distance from 1 to
> 16 is 43763.0757603
> 19 is 126516.988978
> 18 is 1
LN A-go-go Wrote in message:
>
Please tell your email program to use text when posting here, The
html you used can cause numerous problems. One of them prevents
me from quoting context.
If you can get your data to a list of tuples, then you can sort
that list by something like
sorteddata =
> How do you sort distances to prepare for nearest neighbor when the
> results returned look like this
Have you read up on the "key" parameter for Python's sort() function?
You can use that, along with split() to do this.
Alan
___
Tutor maillist - Tu
Python Gurus,
How do you sort distances to prepare for nearest neighbor when the results
returned look like this from the below statements?
DR=distance(n,XCOORDINATE, YCOORDINATE, IDCODE)
DZ=switch(n,XCOORDINATE, YCOORDINATE, IDCODE)
Distance from 1 to
16 is 43763.0757603
19 is 126516.988978
1