Search in Jupyter Notebooks

Testing out the techniques in the Hypermodern Python article series.

Join the Code Quality for Data Science (CQ4ds) Discord channel

The command-line interface prints a pandas dataframe to the console.

Installation

To install the package, run this command in your terminal:

$ pip install nb-query

Usage

Notebook Query’s usage looks like:

$ nb-query [QUERY]
--help

Display a short usage message and exit.

Usage in notebooks

from nb_query import nb_query
nb_query('Hello')
nb_query('Hello', 'data/notebooks')
nb_query('He(ll|r)o')
nb_query(lambda line: len(line) == 2)