Published
Edited
Sep 20, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
df.columns() // lists the columns
Insert cell
df.columns().sepal_length.data // pulling out the raw data (for a column of interest) as an Array.
Insert cell
df.column("sepal_length").data // alternatively
Insert cell
Insert cell
// order by `sepal_length` (default is ascending), then view first five rows.
df.orderby("sepal_length").view(5)
Insert cell
// groupby species and compute mean.

df
.groupby("species")
.rollup({
mean_sepal_length: d => op.mean(d.sepal_length),
sd_sepal_length: d => op.stdev(d.sepal_length),
mean_sepal_width: d => op.mean(d.sepal_width),
sd_sepal_width: d => op.stdev(d.sepal_width),
count: op.count()
})
.view()
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more