...
Code Block | ||
---|---|---|
| ||
raw_data = c3.BlockInfo.fetch(spec={ 'limit': -1, 'filter': 'exists(prp_bf_lr)', 'order': 'descending(id)', 'include': 'pct_i_l,pct_t_l,prp_res_lr,pop10_ha_lr,hu10_ha_lr,eroom_ha_lr,med10_age,prp_bf_lr' }) |
Another useful fetch command is fetchCount. This function is nearly identical to the fetch commands above, but it just returns a count of the number of objects which match the fetch filter. This is useful when trying to determine whether a given search is refined enough.
In the Javascript Console this is:
Code Block |
---|
BlockInfo.fetchCount({'filter': 'exists(prp_bf_lr)'}) |
The same in python is:
Code Block |
---|
c3.BlockInfo.fetchCount(spec={'filter': 'exists(prp_bf_lr)'}) |
More examples of fetch commands can be found in our examples here:be found in our examples here:
- https://github.com/c3aidti/casesExample
- https://github.com/c3aidti/genomicsExample
- https://github.com/c3aidti/HouseCoverageExample
- https://github.com/c3aidti/VaccineListing
- https://github.com/c3aidti/casesExample/EpidemiologyExample
Here is a list of C3 documentation mentioning fetching:
- FetchSpec Documentation: https://developer.c3.ai/docs/7.12.0/type/FetchSpec
- Fetching in Python: https://
...
...
...
- docs/7.12.0/topic/ds-jupyter-notebooks
- Fetch & Filtering: https://
...
...
...
- docs/7.12.17/topic/tutorial-fetching-and-filtering
- Fetch & Filter Basics
Here is a list of C3 documentation mentioning fetching:
- FetchSpec Documentation: https://developer.c3.ai/docs/7.12.017/type/FetchSpectopic/console-data-exploration-fetch-and-filters
- Fetch & Filtering AdvancedFetching in Python: https://developer.c3.ai/docs/7.12.017/topic/ds-jupyter-notebooksconsole-fetch-and-filters-advanced
Converting Fetch results to usable forms in Jupyter Notebook
...