Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-27-2019 12:24 PM
Hello Guys,
I am new to neo4J and ran into an error. It might be silly error but suggestions are most welcome.
I am trying to read the a csv file using the cypher LOADBCSV command in Python and I am getting below error:
py2neo.database.ClientError: SyntaxError: Type mismatch: expected Any, Map, Node, Relationship, Point, Duration, Date, Time, LocalTime, LocalDateTime or DateTime but was List
Below is my Python Cypher Code:
query = """
LOAD CSV FROM 'file:///C:/Users/Vinayak/neo4j-community-3.5.12/import/Data_Loading/City_load_data.csv' AS row
CREATE (c:City {name:row.City, Latitude:toFloat(row.Latitude), Latitude:toFloat(row.Longitude)})
"""
graph.run(query)
12-27-2019 02:04 PM
looks like you've forgot WITH HEADERS
:
LOAD CSV WITH HEADERS FROM 'file.....`
12-27-2019 07:56 PM
Thank you so much. I will try and let you know
All the sessions of the conference are now available online