8000 GitHub - NickCrews/quak: a scalable data profiler
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

NickCrews/quak

 
 

Repository files navigation

quak /kwæk/

an anywidget for data that talks like a duck

Warning

Here be dragons 🐉. quak is a prototype and not production-ready. Expect bugs. The library is open-sourced for SciPy 2024.

install

pip install quak

usage

The easiest way to get started with quak is using the IPython cell magic.

%load_ext quak
import pandas as pd

df = pd.read_csv("https://raw.githubusercontent.com/vega/vega-datasets/main/data/airports.csv")
df

Any cell that returns an object implementing the Python dataframe interchange protocol (i.e., a dataframe-like "thing") will be rendered using quak.Widget, rather than the default renderer.

Alternatively, you can use quak.Widget directly:

import polars as pl
import quak

df = pl.read_csv("https://raw.githubusercontent.com/vega/vega-datasets/main/data/airports.csv")
quak.Widget(df)

development

quak requires both rye (for Python) and deno (for TypeScript).

If you want to develop in the notebooks (./examples/), you will need to run both deno (to (re)build the TypeScript) and rye (to start the Jupyter notebook):

deno task dev

and then start the Python notebook server with rye:

rye sync
rye run jupyter lab

Alternatively, you can just work on the TypeScript side of things by running:

npx vite
# or deno run -A npm:vite

and editing ./lib/example.ts.

We check linting and formatting in CI:

# typescript
deno lint
deno fmt
deno task check

# python
rye lint
rye format

Note

Why the weird TypeScript stuff? In practice, hybrid Python/JS repos get messy with npm and node_modules. With Deno there is no node_modules, and the tool handles type-checking, linting, and formatting. The extra build scripts serve to make nice development ergonamics within and outside of Jupyter.

About

a scalable data profiler

Resources

License

Stars

0 stars 45F4

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 77.4%
  • Python 8.9%
  • Rust 7.8%
  • HTML 4.8%
  • JavaScript 1.1%
0