kosiew commented on code in PR #1247:
URL: 
https://github.com/apache/datafusion-python/pull/1247#discussion_r2370812759


##########
docs/source/user-guide/dataframe/index.rst:
##########
@@ -228,6 +228,33 @@ Core Classes
     * :py:meth:`~datafusion.SessionContext.from_pandas` - Create from Pandas 
DataFrame
     * :py:meth:`~datafusion.SessionContext.from_arrow` - Create from Arrow data
 
+    ``SessionContext`` can automatically resolve SQL table names that match
+    in-scope Python data objects. When automatic lookup is enabled, a query
+    such as ``ctx.sql("SELECT * FROM pdf")`` will register a pandas or
+    PyArrow object named ``pdf`` without calling
+    :py:meth:`~datafusion.SessionContext.from_pandas` or
+    :py:meth:`~datafusion.SessionContext.from_arrow` explicitly. This requires
+    the corresponding library (``pandas`` for pandas objects, ``pyarrow`` for
+    Arrow objects) to be installed.

Review Comment:
   This section of index.rst was trying to illustrate this:
   
   ```python
      pdf = ... # pandas dataframe <-- this requires pandas to be installed
      # or
      pdf = .... # pyarrow object. <-- this requires pyarrow to be installed
      
      # if automatic registration  is enabled, then we can query pdf like this
      ctx.sql("select from pdf")
      # without calling ctx.from_pandas, ctx.from_arrow
   ```
   
   I will amend the section to convey this better.
      



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to