How to transform pandas DataFrame to DataResult

Hi all,

it is probably really simple, but I’m unable to get a DataView from a dataframe. I currently do DataResult(df), but this returns a TypeError: ‘numpy.ndarray’ object is not callable.

Thanks a lot!

Cheers,
Jelle

Hi Jelle,

The reason why your implementation does not work is because the DataView accepts a DataGroup object that holds a range of DataItem objects, which you could further nest with DataGroup objects. For more on the DataView and how to implement it, refer here to the documentation:

If you simply want to visualize your DataFrame object, I would recommend using the PlotlyView, and create a plotly table from a DataFrame as is presented by this example:

Let me know if this was clear and helpful.

1 Like