Skip to content

Instantly share code, notes, and snippets.

@ytakashina
Last active April 8, 2018 02:36
Show Gist options
  • Save ytakashina/a2650898521304a05683267634b8aa00 to your computer and use it in GitHub Desktop.
Save ytakashina/a2650898521304a05683267634b8aa00 to your computer and use it in GitHub Desktop.

Pandas

gb = df.groupby('category')
gb.groups
gb.get_group(1)

Debug

import ipdb;
ipdb.set_trace()

Download

import os
if not os.path.exists('water-treatment.csv'):
    !wget -O water-treatment.csv https://archive.ics.uci.edu/ml/machine-learning-databases/water-treatment/water-treatment.data

Audio

import IPython.display
IPython.display.Audio(url='http://soundeffect-lab.info/sound/button/mp3/decision8.mp3', autoplay=True)

数行ずつ読み取る

with open("data/articles.csv") as f:
    for i in range(100):
        head = list(itertools.islice(f, 100))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment