Skip to main content

I am trying to convert the data present in an OLAP table to a dataframe.

c = get_celonis(**settings)

w = c.workspaces.find(KPI Analysis - CSAT,None)

a = w.analyses.find(CSAT Model,None)

q=a.published.components.ids[7ae951ac-b933-4e62-b8c0-ee21e6a15845].data

Can anyone please help me what can be the command to convert q into a dataframe.

Thanks!!

Hi Mayukha,

welcome to the Celonis Community!

You can retrieve the query of the component using

.pql_query

instead of

.data

.

With

df = a.get_data_frame(q)

you can then send the query to Celonis to get the dataframe.

There is also an example in the documentation:

https://python.celonis.cloud/docs/pycelonis/en/latest/getting-started.html#Working-with-data

Best

David


Hi David,
I have tried the same but I am getting an error while creating a data frame.

image.png24881350 376 KB

Hi Mayukha,

We can definitely solve this! First idea: could you update the pycelonis package? You can do this by running:

!pip install -U pycelonis

in a cell of your jupyter notebook.

If you then restart your kernel and run your code again it should work!

Does this solve the problem?

Cheers,

Simon


Reply