Skip to content

Commit

Permalink
Merge pull request #1478 from wenhoujx/master
Browse files Browse the repository at this point in the history
Update README.md python code example
  • Loading branch information
mewim committed Apr 21, 2023
2 parents 9bbaba9 + 6918589 commit a0a51d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ conn.execute('COPY User FROM "user.csv"')
conn.execute('COPY Follows FROM "follows.csv"')
# Run a query.
results = conn.execute('MATCH (u:User) RETURN COUNT(*);')
while results.hasNext():
print(results.getNext())
while results.has_next():
print(results.get_next())
# Run a query and get results as a pandas dataframe.
results = conn.execute('MATCH (a:User)-[f:Follows]->(b:User) RETURN a.name, f.since, b.name;').getAsDF()
results = conn.execute('MATCH (a:User)-[f:Follows]->(b:User) RETURN a.name, f.since, b.name;').get_as_df()
print(results)
# Run a query and get results as an arrow table.
results = conn.execute('MATCH (u:User) RETURN u.name, u.age;').get_as_arrow(chunk_size=100)
Expand Down

0 comments on commit a0a51d5

Please sign in to comment.