Comment on page
Query project files
Noteable provides an internal DuckDB database for querying project files + Pandas dataframes using SQL.
- 1.Create a SQL cell using one of these options:
- Use thesign 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.Select CSV Files + Dataframes from the connection drop-down menu.
- 3.Run query.
To run a query against a CSV file, enter the filename of your CSV file within quotes as the table name, like this:
To run a query against a pandas dataframe, the table name will be the pandas dataframe name, no quotes needed:
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 = _")