ccurme / yolopandas Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
This error occurs when I am asking it to find sum of rows of certain column after filtering the rows by value of another column. In case of value being string, its applying the flag=re.IGNORECASE
which is throwing the error re
is not defined
This is the command returned by chatGPT:
df[df['Description/Narration'].str.contains('MONTHLY INTEREST', flags=re.IGNORECASE)]['Credit(Cr.)'].sum()
I asked this question:
df_table.llm.query("What is the total credit with MONTHLY INTEREST in Description?")
I think yolopandas is a great package!!!
It not only replaces pandas code and plot with natural language, but also greatly saves openai api usage. Moreover, it natively creates "memory" (instead of vector DB) for more interaction/conversation.
Because I have gained confidence of the auto generated code, I won't ask for the following requirement anymore.
yolo - you only look once really fits well the functionality the package provides, there is no reason why it can't be yolosklearn, yolofastai, yolonetworkx, yolocvxpy,..., and finally, yolopython!
Great work!!!
######################################
Is it possible to output code even when yolo=True?
I am using yolopandas in streamlit, to output results and charts, I want to also show the code as a validation after the response, not before the response.
What's the relatively "safe" way to use this library to isolate it from user data on my machine? Would using it inside a docker container be ok or do I have to go further and only use it on a machine with a fresh install of os-x? I am responding to the "Warning: YOLOPandas will execute arbitrary Python code on the machine it runs on. This is a dangerous thing to do." I have browsed the code looks ok.
hi,
I am running your example on databricks and colab but both throw error for llm.query("Make a bar plot of the result and use a log scale.", yolo=True)
Error:
KeyError Traceback (most recent call last)
File /databricks/python/lib/python3.10/site-packages/pandas/core/indexes/base.py:3629, in Index.get_loc(self, key, method, tolerance)
3628 try:
-> 3629 return self._engine.get_loc(casted_key)
3630 except KeyError as err:
File /databricks/python/lib/python3.10/site-packages/pandas/_libs/index.pyx:136, in pandas._libs.index.IndexEngine.get_loc()
File /databricks/python/lib/python3.10/site-packages/pandas/_libs/index.pyx:163, in pandas._libs.index.IndexEngine.get_loc()
File pandas/_libs/hashtable_class_helper.pxi:5198, in pandas._libs.hashtable.PyObjectHashTable.get_item()
File pandas/_libs/hashtable_class_helper.pxi:5206, in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'type'
any idea? Thanks a lot!
Queries might reference common packages-- including those in the standard library-- that are not in the namespace of the .query
method.
A workaround is to add an instruction in the query to "import any packages you need", but this is cumbersome.
Consider leveraging langchain's PythonREPL and supporting agentic behavior (e.g., so that standard library packages can be imported when needed).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.