dbfread icon indicating copy to clipboard operation
dbfread copied to clipboard

Docs are not clear in the accession order of the data

Open vesnikos opened this issue 7 years ago • 5 comments

it is not clear when you do

for row in DBF('xxx.dbf'): ......

If the rows are accessed/read in a sorted order or in a random order

vesnikos avatar Sep 13 '17 11:09 vesnikos

The rows are read in the order they appear in the file so they will not be sorted in any way.

olemb avatar Sep 14 '17 13:09 olemb

That's interesting, so if I want to access the rowid, how would I be able to do that?

vesnikos avatar Sep 14 '17 13:09 vesnikos

There's no direct way to do it. dbfread is designed for getting all of the data out of a file for processing somewhere else so there's no way to get a single record by row ID.

olemb avatar Sep 14 '17 13:09 olemb

Do you think you could update the docs to be a little more clear on the subject? I figured that would be the case, as it wasn't specifically saying anything about it, but I didn't see anything in the docs to confirm it

vesnikos avatar Sep 14 '17 13:09 vesnikos

That's a good point. I will keep this issue open until the docs have been updated.

olemb avatar Dec 21 '20 03:12 olemb