-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%ng_draw AssertionError: Result is not in Pandas DataFrame Style #57
Comments
@maweijiao Hi, I am facing the same issue. Pls let me know if you have any update on this. Thanks |
@maweijiao @hungbui-io I guess the two lines is enough:
No need to config anything |
Sorry I missed this issue. The ng_draw command can be done only after the query being done, a 'df=_' call will interrupt the context needed for ng_draw. Could you do ng_draw follow the ngql one by one? This should work. The df = _ could be evaluated with another ngql call. We can add feature to draw from a df later to improve this later. |
Also, now ng_draw will be working with both result formats in latest release. |
Hi @wey-gu . I am still facing the issue...Any idea? |
Dear @hungbui-io Would you mind helping perform pip install -U this package to see how it goes with latest version? As from your backtrack, it's shown with an older version and in the current release, I make it try to cast other styles of output into pd df. |
Hi @wey-gu, thanks for your support. I have updated the package to 0.13.1, and here is the new error. |
Dear @hungbui-io @maweijiao , The latest release I just made 0.13.2 should fix the above issues:
Kindly help verify your use case when possible, thanks!! |
@wey-gu Thanks!When I upgraded, there was an error, regardless of whether I set ‘IPythonNGQL.ngql_result_style=“pandas”’. |
@maweijiao thanks a lot for the test! Could you please help share what queries are you using to trigger such error? And/or any queries will end up such error? As I cannot reproduce it in my env. |
@maweijiao I had tried different types of queries and render with
|
%config IPythonNGQL.ngql_result_style="pandas"
%ngql MATCH (p:
entity
)-[e:relationship]->(m:entity
) WHERE p.entity
.name
== '迈克尔·鲁克' RETURN p,e,m%ng_draw
AssertionError Traceback (most recent call last)
Input In [14], in <cell line: 1>()
----> 1 get_ipython().run_line_magic('ng_draw', '')
File D:\P\anaconda3\lib\site-packages\IPython\core\interactiveshell.py:2294, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
2292 kwargs['local_ns'] = self.get_local_scope(stack_depth)
2293 with self.builtin_trap:
-> 2294 result = fn(*args, **kwargs)
2295 return result
File D:\P\anaconda3\lib\site-packages\ngql\magic.py:378, in IPythonNGQL.ng_draw(self, line, cell, local_ns)
376 return "No result found, please execute a query first."
377 result_df = local_ns[variable_name]
--> 378 assert isinstance(
379 result_df, pd.DataFrame
380 ), "Result is not in Pandas DataFrame Style"
382 # Create a graph
383 g = Network(
384 notebook=True,
385 directed=True,
(...)
391 neighborhood_highlight=True,
392 )
AssertionError: Result is not in Pandas DataFrame Style
不太清楚问题出在了哪里,谢谢~
The text was updated successfully, but these errors were encountered: