Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
I would like to return some values from the dataset that was build as a part of the scenario in the report.
Hi @Sunny ,
You could use a python step to set scenario variable and later use these in the reporter.
Here is an example where I add the df.shape as a variable
# -*- coding: utf-8 -*-
import dataiku
import pandas as pd
from dataiku import pandasutils as pdu
from dataiku.scenario import Scenario
# Read recipe inputs
crm_history = dataiku.Dataset("crm_history")
df = crm_history.get_dataframe()
variable_value = str(df.shape)
scenario = Scenario()
variable_param = {"df_shape_var": variable_value}
scenario.set_scenario_variables(**variable_param)
# Print all variables now available for troubleshooting
variables = Scenario().get_all_variables()
print(variables)