金子邦彦研究室人工知能オープンデータ,データファイル処理Kaggle のインストール,データの一覧表示(Python, kaggle を使用)

Kaggle のインストール,データの一覧表示(Python, kaggle を使用)

URL: https://github.com/Kaggle/kaggle-api

前準備

Python のインストール(Windows 上)

サイト内の関連ページ

関連する外部ページ

Python の公式ページ: https://www.python.org/

Python 用 kaggle インストール

Windows の場合

python -m pip install -U urllib3 six certifi python-dateutil requests tqdm python-slugify idna chardet Unidecode
python -m pip install -U kaggle

Ubuntu の場合

sudo apt -y update
sudo apt -y install python3-urllib3 python3-six python3-certifi python3-dateutil python3-requests python3-tqdm python3-slugify python3-idna python3-chardet python3-unidecode
sudo python3 -m pip install -U kaggle

Kaggle のインストール,データの一覧表示

  1. Kaggle のサインアップを行い,アカウントを取得する. https://www.kaggle.com
  2. Account タブで,ユーザプロファイル(user profile)を開き, 「Create API Token」をクリック.

    [image]

    [image]
  3. kaggle.json がダウンロードされる.

    Windows の場合は,C:\Users\<ユーザ名>\.kaggle\kaggle.json に置く.

    Ubuntu の場合は,~/.kaggle/kaggle.json に置く.

  4. 「kaggle competitions list」で,competitions の一覧が表示される

    [image]
  5. 「kaggle datasets list」で,データセットの一覧が表示される

    [image]