Git Product home page Git Product logo

pandas-handson's Introduction

pandas-handson

Pandas ハンズオン用のリポジトリ

ハンズオンの準備

リポジトリのクローン

このリポジトリをcloneしておいてください。cloneするにはgitコマンドが使える状態である必要があります。 gitのインストールページ を参照してインストールしてください。

$ git clone https://github.com/hannari-python/pandas-handson.git

で準備完了です。

Dockerを使ってJupyterNotebookを起動する

Dockerページからインストーラーを使ってインストールしてください。
他にもインストール方法があるので各自の環境に合わせてインストールしてください。
docker-compose コマンドが使える状態にしてください。

リポジトリをクローンして pandas-handson/ に移動します。

$ cd pandas-handson

Dockerコンテナを起動します。

$ docker-compose up --build

ブラウザでアクセスするとJupyterNotebookのページが表示されます。 http://localhost:10000/

ログでは port が 8888 となっていますが、 dockerの設定で実際は portは 10000 なので注意して下さい。

(ポートが衝突する方は docker-compose.yml の ports: の 10000 ( : の左側の値) を任意に変えてください。

JupyterにTokenを入力する

Dockerを起動すると以下のようなログが出力されます。 JupyterNotebookでTokenの入力が求められる場合は token=9f326855be41edceef50e23573299be1ec7599c9b5a6c010 に記されている文字列を入力してください。

a5fcdfba0650_pandas-handson_jupyter_1 | [C 08:44:14.414 LabApp]
a5fcdfba0650_pandas-handson_jupyter_1 |
a5fcdfba0650_pandas-handson_jupyter_1 |     Copy/paste this URL into your browser when you connect for the first time,
a5fcdfba0650_pandas-handson_jupyter_1 |     to login with a token:
a5fcdfba0650_pandas-handson_jupyter_1 |         http://(a5fcdfba0650 or 127.0.0.1):8888/?token=9f326855be41edceef50e23573299be1ec7599c9b5a6c010
a5fcdfba0650_pandas-handson_jupyter_1 | [I 08:44:21.096 LabApp] 302 GET / (172.23.0.1) 3.67ms

Dockerを終了する

Dockerを実行しているコンソールで「Control」キーと「C」キーを同時に押して(Ctrl+C)ください。

ディレクトリについて

work/

JupyterNotebook のNotebookファイル(*.ipynb)が保存されます。

data/

JupyterNotebookにCSVファイルなどを読み込ませる場合にここに配置します。 hannari.csv というファイルを配置した場合は /data/hannari.csv としてJupyterNotebookから読み込めます。

トラブルシューティング

ERROR: Version in "./docker-compose.yml" is unsupported.

ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/ 

上記のようなエラーが発生する場合は docker-compose.yml のバージョン部分を次のように変更して下さい。

-version: '3.7'
+version: '3.3'
 services:
   jupyter:
     build:

pandas-handson's People

Contributors

jdgthjdg avatar masayuki14 avatar banquetkuma avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.