Skip to content

Commit bf1ba0b

Browse files
committed
small fix
1 parent 2569680 commit bf1ba0b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vector_search_example/vector_search_example.ipynb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
},
135135
{
136136
"cell_type": "code",
137-
"execution_count": 45,
137+
"execution_count": null,
138138
"metadata": {},
139139
"outputs": [
140140
{
@@ -159,9 +159,12 @@
159159
"driver = neo4j.GraphDatabase.driver(\"bolt://localhost:7687\", auth=(\"\", \"\"))\n",
160160
"with driver.session() as session:\n",
161161
" for index, row in nolan_movies.iterrows():\n",
162+
" # remove quotes from the title to avoid parsing issues\n",
163+
" row[\"Title\"] = row[\"Title\"].replace('\"', '')\n",
164+
" \n",
162165
" embedding = embeddings[index].tolist()\n",
163166
" embeddings_str = \",\".join([str(x) for x in embedding])\n",
164-
" query = f\"CREATE (m:Movie {{title: '{row['Title']}', year: {row['Release Year']}, embedding: [{embeddings_str}]}})\"\n",
167+
" query = f'CREATE (m:Movie {{title: \"{row[\"Title\"]}\", year: {row[\"Release Year\"]}, embedding: [{embeddings_str}]}})'\n",
165168
" print(query)\n",
166169
" session.run(query)"
167170
]

0 commit comments

Comments
 (0)