Replies: 4 comments 15 replies
-
Do you mean you have a df in a jupyter notebook environment? |
Beta Was this translation helpful? Give feedback.
-
Yes
…On Mon, Oct 16, 2023 at 3:45 PM Chi Wang ***@***.***> wrote:
Do you mean you have a df in a jupyter notebook environment?
—
Reply to this email directly, view it on GitHub
<#261 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5IT75WAGXOWOKZSOJUP2NDX7WMHHAVCNFSM6AAAAAA6CXUJHOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TEOJXGIYDO>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The code execution module currently doesn't support persisted session. So each time the code will be executed from a new Python session. However, there is a way to do this using function calls, with our latest release. df = Dataframe(...)
assistant = ConversableAgent(name="assistant", system_message=f"You are AI assistant for data analysis, here is a dataframe you can query using the function df_query. The dataframe has the following columns: {df.columns} and here is a preview: {df.head()}.")
user_proxy = UserProxyAgent(name="user proxy")
@assistant.register_for_llm(description="Function to query the dataframe")
@user_proxy.register_for_execution()
def df_query(query: Annotated[str, "The query string used for df.query()"]) -> Annotated[str, "Output"]:
return str(df.query(query))
user_proxy.initiate_chat(assistant, "Hey please tell me what is the maximum value of ...") |
Beta Was this translation helpful? Give feedback.
-
Found an interesting demo about this from discord: https://www.youtube.com/watch?v=iF2RguoqmrA |
Beta Was this translation helpful? Give feedback.
-
I have a pandas data frame in memory. However, I am not sure how I read the data frame via Autogen agents and analyze or build later steps. Is that possible? please help.
Beta Was this translation helpful? Give feedback.
All reactions