How to Solve NameError: name 'r' is not defined -- rethinkdb

Solution: Import the 'r' module

To Solve the error, add the following line to the top of your code.

from rethinkdb import r

 

For more information:
Python rethinkdb r