@@ 1265,6 1265,9 @@ class Output:
pivot_args : list[rep.PivotArgs], optional
The arguments to pass in order to create a PivotTable.
+ include_data : bool
+ Saves the original dataframe in the compiled output.
+
Returns
-------
@@ 2949,6 2952,8 @@ def pull(
subkey: str,
slicers: dict = {},
comp: dict = {},
+ pivots: list[Optional[rep.PivotArgs]] = [None],
+ include_data: bool = False,
) -> Compile:
"""Creates the query and pulls the data for the given report structure.
@@ 2966,6 2971,10 @@ def pull(
Additional values used for specific reports in this module. For
instance, equipment_report has a value "style" which can be modified
here.
+ pivots : list[rep.PivotArgs], optional
+ The arguments to pass in order to create a PivotTable.
+ include_data : bool
+ Saves the original dataframe in the compiled output.
Returns
-------
@@ 2995,10 3004,13 @@ def pull(
if key in report.compilate.args:
setattr(report, key, value)
+ if pivots:
+ report.pivot = pivots
+
# Construct the query and pull the data.
out = Super(report).pull()
- compilate = out.compile()
+ compilate = out.compile(include_data=include_data)
return compilate