...
Code Block |
---|
## continue from above ## import pandas as pd df = pd.DataFrame(raw_dfdata.objs.toJson()) df.head() df.drop('meta', axis=1, inplace=True) df.drop('type', axis=1, inplace=True) df.drop('version', axis=1, inplace=True) df.drop('id', axis=1, inplace=True) df.head() |
...
Users can then use the resulting dataframe as they normally would.
ExpressionEngineFunctions
Several spots in the C3 API allow for the use of so-called 'ExpressionEngineFunctions
...
'. These functions take a variety of
arguments and perform a variety of processing tasks. For example, the function 'contains' takes two strings and checks
whether the first argument contains the second argument. The function 'lowerCase' takes an input string, and returns
that string with all uppercase letters replaced with lowercase ones. In addition to those string processing functions,
many math functions exist as well such as 'log' which operates on a variety of input data types.
These functions are very helpful, and can be used in a number of places such as:
- 'filter' field of FetchSpec
- 'expression' field of ComplexMetric
Official C3 documentation for ExpressionEngineFunctions: https://developer.c3.ai/docs/7.12.0/type/ExpressionEngineFunctionTODO:
Executing Metrics on Time series data
...