datajoint / datajoint-docs-original

https://docs.datajoint.org
Other
2 stars 13 forks source link

fetch: topic coverage inconsistent btw/python matlab in split vers (order by, etc) #101

Open ixcat opened 5 years ago

ixcat commented 5 years ago

Fetch documentation in split version doesn't cover 'order by' in python; more generally, the coverage of fetch is more in depth on the matlab side.

while some features are language specific, general topic coverage applicable to both should be consistent (inc. 'order by')

matlab current topics in fetch page:

python current topics in fetch page:

ideally, the general structure should match for both and coverage should be similar to resolve this issue

ixcat commented 4 years ago

notes from slack:

the documentation on fetch semantics could use some improvement - as dimitri mentions basically:
.fetch() : recarray 
.fetch(as_dict=True) : list of dictionaries
.fetch(format='frame') : pandas
.fetch1() : single dictionary with ‘only one result’ check.
.fetch('KEY') / .fetch1('KEY') : list of dictionaries or single dictionary containing only primary key attributes for table
personal programming preferences aside, the ‘dictionary’ returning calls tend to be (more) useful when dealing with further queries and database data (e.g. manipulating structures in python), whereas the ‘array’ methods tend towards being more useful for computation (e.g. np.* methods), so after getting used to the discrepancies, it becomes fairly intuitive.
Adding this to:
https://github.com/datajoint/datajoint-docs/issues/101
for the moment.