Skip to content

%ng_draw AssertionError: Result is not in Pandas DataFrame Style #57

@maweijiao

Description

@maweijiao

%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

image

不太清楚问题出在了哪里,谢谢~

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions