CAVEconnectome / CAVEclient

This is the python client for accessing REST APIs within the Connectome Annotation Versioning Engine.
https://caveconnectome.github.io/CAVEclient/
MIT License
21 stars 11 forks source link

Dataframe attributes #65

Closed ceesem closed 2 years ago

ceesem commented 2 years ago

This PR makes two additions to the materialization client:

1) Query and table metadata is optionally attached to a query dataframe using the df.attrs dictionary that pandas suggests. By default, metadata is attached. This includes all table metadata, as well as any query filters, and the materialization version or live query timestamp.

2) Added a timestamp="now" to the convert_timestamp parser, so that live query can be used without as much datetime boilerplate. The metadata makes this more meaning, because the actual value of the live query timestamp is included and can be trivially passed to subsequent calls.