lux.executor.PandasExecutor.PandasExecutor¶
-
class
lux.executor.PandasExecutor.PandasExecutor[source]¶ Given a Vis objects with complete specifications, fetch and process data using Pandas dataframe operations.
Methods
__init__()Initialize self. apply_filter(df, attribute, op, val)Helper function for applying filter to a dataframe compute_data_model(ldf)compute_data_type(ldf)compute_dataset_metadata(ldf)compute_stats(ldf)execute(vislist, ldf)Given a VisList, fetch the data required to render the vis. execute_2D_binning(vis)execute_aggregate(vis[, isFiltered])Aggregate data points on an axis for bar or line charts execute_binning(vis)Binning of data points for generating histograms execute_filter(vis)execute_sampling(ldf)mapping(rmap)reverseMapping(map)-
static
apply_filter(df: lux.core.frame.LuxDataFrame, attribute: str, op: str, val: object) → lux.core.frame.LuxDataFrame[source]¶ Helper function for applying filter to a dataframe
Parameters: - df (pandas.DataFrame) – Dataframe to filter on
- attribute (str) – Filter attribute
- op (str) – Filter operation, ‘=’, ‘<’, ‘>’, ‘<=’, ‘>=’, ‘!=’
- val (object) – Filter value
Returns: df – Dataframe resulting from the filter operation
Return type: pandas.DataFrame
-
static
execute(vislist: lux.vis.VisList.VisList, ldf: lux.core.frame.LuxDataFrame)[source]¶ Given a VisList, fetch the data required to render the vis. 1) Apply filters 2) Retrieve relevant attribute 3) Perform vis-related processing (aggregation, binning) 4) return a DataFrame with relevant results
Parameters: - vislist (list[lux.Vis]) – vis list that contains lux.Vis objects for visualization.
- ldf (lux.core.frame) – LuxDataFrame with specified intent.
Returns: Return type: None
-
static