#Pythonでデータ分析したいガチ初心者です
勤務先でのデータ分析は基本的にExcelで行いますが、
Pythonで分析できるようになりたい。
その方がかっこいい気がするし、
Excelで膨大なデータを扱うこと自体に限界があるし。
そこで、個人的に勉強を始めました。
##注意
筆者の個人用PCはMacbookです。
Windowsだと操作が多少異なるかもしれません。
#起動
ターミナルに ipython notebook
と打ち込みます。
$ ipython notebook
実行すると、localhostで立ち上がりました。

#新規作成
右端の"New▼"ボタンを選択し、
"Python3"を選択します。

#計算させてみる
例えば、 2+2
を実行します。
実行は "▶︎|Run"ボタン か Ctrl+Enter のどちらかです。

行を追加するときは、左端の "+" でできます。
しかし、実行しながら次の行を追加するなら Shift+Enter が便利です。

#コメントアウト
"Code"とあるところをプルダウンすると"Markdown"があります。
それを選びます。

マークダウン記法に乗っ取り、
半角シャープと半角スペースを頭につけます。
シャープの数でコメントの文字の大きさが勝手に変わります。
日本語でもコメントアウトできます。
# 大きいクマ(シャープ1つで文字の大きさ最大)
## 中くらいのクマ(シャープ2つで一回り小さい文字)
### 小さいクマ(シャープ3つでさらに小さい文字)

実行するとこのように出力され Markdown だったところが自動的に Code に戻っています。

#ファイル名変更
ファイル名を書きましょう。
Jupytorタイトルの右に "Untitled1"とあります。

それをクリックすると、タイトルを編集できます。

ここではファイル名をとりあえず 森のクマさん にしました。
#保存
File の Save and Checkpoint を選ぶか、
左端のフロッピーディスクのアイコンをクリックします。

#終了
ターミナルで Ctrl + C を実行すると、
終了していいかどうか聞かれるので5秒以内に同意しましょう。
5秒以内に答えないとこうなる。

それで、notebook の localhostを閉じます。