def zoo_counts_bubbles(): # Bubblesデータ処理ツールキットを使って簡略化出来る import bubbles p = bubbles.Pipeline() p.source( bubbles.data_object('csv_source', 'files/zoo.csv', infer_fields=True)) p.aggregate('animal', 'hush') # animalごとのhushを集計する p.pretty_print() # 整形して表示
# -*- coding: utf-8 -*- """ Created on Thu Sep 25 23:21:31 2014 @author: [email protected] """ import bubbles URL = "https://raw.github.com/Stiivi/cubes/master/examples/hello_world/data.csv" bubbles.Pipeline() p = bubbles.Pipeline() p.source(bubbles.data_object("csv_source", URL, infer_fields=True)) p.aggregate("Category", "Amount (US$, Millions)") p.pretty_print()
import bubbles p = bubbles.Pipeline() p.source(bubbles.data_object('csv_source', 'zoo.csv', infer_fields=True)) p.aggregate('animal', 'hush') p.pretty_print()