dogwoodlx
New Contributor II

Results from an SQL cell are available as a Python DataFrame. The Python DataFrame name is _sqldf.

To save the DataFrame, run this code in a Python cell:

df = _sqldf

Keep in mind that the value in _sqldf is held in memory and will be replaced with the most recent results of each SQL cell run.

https://docs.databricks.com/notebooks/notebooks-use.html#explore-sql-cell-results-in-python-notebook...