我是使用
neo4jdb-python
包来查询Neo4j数据库的。例如,考虑下面的代码:import neo4j
connection = neo4j.connect("http://localhost:7474")
cursor = connection.cursor()
for i in cursor.execute("MATCH a RETURN a LIMIT 1"):
print i
但输出的形式是元组,即
({u'text': u'Stoyanov, S., Hoogveld, B., Kirschner, P.A., (2010). Mapping Major Changes to Education and Training in 2025, in JRC Technical Note JRC59079., Publications Office of the European Union: Luxembourg.', u'identifier': u'reference/lak/226'},)
如何以csv格式获取输出。这是通过neo4j的Web视图实现的,输出格式如下:
"{""text"":""Stoyanov, S., Hoogveld, B., Kirschner, P.A., (2010). Mapping Major Changes to Education and Training in 2025, in JRC Technical Note JRC59079., Publications Office of the European Union: Luxembourg."",""identifier"":""reference/lak/226""}"
然而,我希望通过客户端程序来完成,因为我需要将其嵌入到另一个程序中。如果使用neo4jdb-python
不可行,则还有哪些其他选项可用。