1 of 6

Lecture 12

Table Examples

DATA 8

Spring 2023

2 of 6

Announcements

  • Homework 4 due Wednesday 2/15 at 11pm
  • Project 1 due Friday 2/24 at 11pm
    • Checkpoint due this Friday 2/17 at 11pm
  • Midterm Accommodation form due 2/25
  • Midterm is Friday March 10 7pm-9pm
  • Swupnil’s OH are today, 4-6pm at FSM Cafe

3 of 6

Table Review

4 of 6

Important Table Methods

t.select(column, …) or t.drop(column, …)

t.take([row_num, …]) or t.exclude([row_num, …])

t.sort(column, descending=False)

t.where(column, are.condition(...))

t.apply(function_name, column, …)

t.group(column) or t.group(column, function_name)

t.group([column, …]) or t.group([column, …], function_name)

t.pivot(cols, rows) or t.pivot(cols, rows, vals, function_name)

t.join(column, other_table, other_table_column)

5 of 6

Table Practice

6 of 6

Bike Sharing in SF Bay Area

(Demo)

Hourly bike sharing in the Bay Area began with a pilot program in 2014-2015 that produced a public dataset.

  • The SF Metropolitan Transportation Commission organized an Open Data Challenge in which participants visualized the dataset in interesting ways.

by Bjorn Vermeersch