Search
K
Comment on page

Query project files

Noteable provides an internal DuckDB database for querying project files + Pandas dataframes using SQL.

Query the data

  1. 1.
    Create a SQL cell using one of these options:
    • Use the
      sign on a cell above or below the cell you want to create and select SQL from the cell drop-down menu.
    • Select New SQL Cell from the Cell menu.
    • While in command mode, use hotkeys to insert a cell above (a) or below (b) the current cell and then select SQL from the cell drop-down menu.
  2. 2.
    Select CSV Files + Dataframes from the connection drop-down menu.
  3. 3.
    Run query.

Run a query against a CSV file

To run a query against a CSV file, enter the filename of your CSV file within quotes as the table name, like this:
SELECT *
FROM '<filename.csv>'

Run query of Pandas dataframes:

To run a query against a pandas dataframe, the table name will be the pandas dataframe name, no quotes needed:
SELECT *
FROM df_1
The output from a SQL query is automatically stored in a Pandas dataframe and can be accessed by referencing it with “_” in the next cell (ex. "pd = _")

Learn more