Skip to main content

This is in regards to the beta functions in the Staging/Raw UI that enables opening access to a Raw table in a jupyter notebook and using AI chat to ask questions about that data table.

I’ve used this before with no problems but today I’m getting errors in the pre-defined code provided by the function. 

An error is thrown in Cell 2 in the attached notebook.

from cognite.client import CogniteClient
import pandas as pd
# Hide SettingWithCopyWarning
pd.options.mode.chained_assignment = None
from cognite.ai import load_pandasai
SmartDataframe, SmartDatalake = await load_pandasai()
client = CogniteClient()

 

 

The errors are 

<ipython-input-2-054a60fe724a>:2: DeprecationWarning: Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0), (to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries) but was not found to be installed on your system. If this would cause problems for you, please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466 import pandas as pd

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In 2], <a href='vscode-notebook-cell:?execution_count=2&line=6'>line 6</a> <a href='vscode-notebook-cell:?execution_count=2&line=4'>4</a> pd.options.mode.chained_assignment = None <a href='vscode-notebook-cell:?execution_count=2&line=5'>5</a> from cognite.ai import load_pandasai ----> <a href='vscode-notebook-cell:?execution_count=2&line=6'>6</a> SmartDataframe, SmartDatalake = await load_pandasai() <a href='vscode-notebook-cell:?execution_count=2&line=7'>7</a> client = CogniteClient() ValueError: too many values to unpack (expected 2)

Can anyone help?

 

Thanks

@Chris Selph I have moved this post to the Jupyter Notebook Early Adopter] group. I’ll get back to you with an update on the issue that you are currently observing.


Hi,

I know what is going on here. A new version of the package has been released and we need to update the auto generated code. Will provide a fix!


Reply