(feature): query dataset to return pandas df #93
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
There's functionality in pandas that isn't possible, currently, using APL. Sometimes it makes sense to pull the data out and run more advanced algorithms on the raw data (e.g. ML) and therefore, have this functionality inside the library for the benefit of everyone and to ease adoption of the library and thus Axiom as a platform.
Functionality
This the first attempt at adding pandas dataframe functionality to axiom. It builds the dataframe up across multiple threads in order to increase the performance when dealing with large amounts of data.
With this PR I've also added tabular, as it's a far cleaner format to convert into a dataframe (as it's a matrix), it also handles nesting.
Switched most of the camelCase vars to snake_case inline with python best practices (this was harder than planned when using dacite)
Limitations
When querying large amounts of data > 10000 rows it's very slow. This is a limitation imposed by the API. This can be somewhat overcome by using axiom as it was intended, by filtering / aggregating using APL before querying.
The query must contain a "sort by _time asc" with the asc meaning that maxCursor is used
Example