Most Conc reporting functionality outputs a Result object. This gives flexibility about how you want to work with the results, including displaying them in a notebook, converting the result to a Polars dataframe, or returning the HTML for the result.
if the df is a lazyframe, collect before returning
Examples
This example is just to illustrate the basic functionality. When you run a Conc report method, it will return a Result object. You can add .display() to the result to output the result in your notebook. You can use .to_frame() if you want to work with the data as a Polars dataframe. The Recipes page has helpful examples relevant to working with Conc results outside of Conc.
result = Result(type='example', df = pl.DataFrame({'Token': ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],'Frequency': [5, 4, 3, 2, 1]}), title ='Example Table', description ='This is an example result.', summary_data = {}, formatted_data = ['Formatted data text example 1', 'Formatted data text example 2'] )result.display()