タグ

2016年8月23日のブックマーク (5件)

  • 【git】特定のコミットまで戻す - inari blog (@inari111)

    2014-05-18 【git】特定のコミットまで戻す Git どこまで戻すか決める コミットの履歴を確認する $ git log commit ************************ ハッシュ値をコピる commit以下の文字列 戻す $ git reset —hard ハッシュ値 tky-24 2014-05-18 00:23 【git】特定のコミットまで戻す Tweet 広告を非表示にする コメントを書く « 【Sublime Text3】CSSをリアルタイムで更… 【git】 いらないbranchを削除する »

    【git】特定のコミットまで戻す - inari blog (@inari111)
    U1and0
    U1and0 2016/08/23
    コミットの履歴を確認する $ git log commit ************************ ハッシュ値をコピる commit以下の文字列 戻す $ git reset --hard ハッシュ値
  • データの可視化をPython seabornでお手軽に。 - Qiita

    Seaborn is a Python visualization library based on matplotlib. It provides a high-level interface for drawing attractive statistical graphics. 意訳すると、matplotlibのwrapperとしてより高レベルな(抽象化された)インタフェースを提供してくれるそうです。 urllibに対するrequestsパッケージみたいな位置づけかな。 インタフェースも大事ですが、こんなheatmapを10行程程度のコードで描画できてしまうなら、学習意欲が湧いてきますよね。 とは言え、いきなりheatmap描くような大そうなデータは持ち合わせていないので、我が家の家電製品の消費電力データを使って基的なグラフを描画してみようと思います。 $ cat 冷蔵庫.csv

    データの可視化をPython seabornでお手軽に。 - Qiita
    U1and0
    U1and0 2016/08/23
    ax = sns.pointplot( x='DateTime', # x軸にDateTime y='Watt', # y軸にWatt data=data, # DataFrameを指定 markers=['']) # dataをplotするマーカーを非表示に
  • Python pandas で日時関連のデータ操作をカンタンに - StatsFragments

    概要 Python で日時/タイムスタンプ関連の操作をする場合は dateutil や arrow を使っている人が多いと思うが、 pandas でもそういった処理がわかりやすく書けるよ、という話。 pandas の領は多次元データの蓄積/変形/集約処理にあるが、日時操作に関連した強力なメソッド / ユーティリティもいくつか持っている。今回は それらを使って日時操作を簡単に行う方法を書いてく。ということで DataFrame も Series もでてこない pandas 記事のはじまり。 ※ ここでいう "日時/タイムスタンプ関連の操作" は文字列パース、日時加算/減算、タイムゾーン設定、条件に合致する日時のリスト生成などを想定。時系列補間/リサンプリングなんかはまた膨大になるので別途。 インストール 以下サンプルには 0.15での追加機能も含まれるため、0.15 以降が必要。 pip

    Python pandas で日時関連のデータ操作をカンタンに - StatsFragments
    U1and0
    U1and0 2016/08/23
    dtidx = pd.date_range('2014-11-01 00:00', periods=20, freq='H') selector = [False, True, False, False, True] * 4 dtidx[selector].asobject.tolist()
  • Making heatmap from pandas DataFrame

    U1and0
    U1and0 2016/08/23
    カラーマップplt.pcolor(df) plt.yticks(np.arange(0.5, len(df.index), 1), df.index) plt.xticks(np.arange(0.5, len(df.columns), 1), df.columns) plt.show()
  • Add x and y labels to a pandas plot

    Suppose I have the following code that plots something very simple using pandas: import pandas as pd values = [[1, 2], [2, 5]] df2 = pd.DataFrame(values, columns=['Type A', 'Type B'], index=['Index 1', 'Index 2']) df2.plot(lw=2, colormap='jet', marker='.', markersize=10, title='Video streaming dropout by category') How do I easily set x and y-labels while preserving my ability to use specific colo

    Add x and y labels to a pandas plot
    U1and0
    U1and0 2016/08/23
    pandas.plotの設定はpandas.plotをした後にplt.hoge()ってな感じで設定を付け加えるdf2.plot(lw=2,colormap='jet',marker='.',markersize=10,title='Video streaming dropout by category') plt.xlabel('xlabel') plt.ylabel('ylabel') plt.show()