gh-pages

Contents:

  • ASCII CODE TABLE
  • BOMとPython
  • Category x Quantity のPlot
  • ContextManagerとcontextlibいろいろ
  • DMP入門
  • DataFrame.to_string と ZipFile.writestr調べた
  • DataFrameが等しいことを確認する
  • Erlangをはじめるためのまとめ
  • Excel VBA
  • Google Analytics CSV
  • Haskell環境+Atom
  • Install pandoc and convert to ReST from markdown
  • Janomeによる形態素解析と形態素を見やすく整形
  • Java クラスファイル逆アセンブラ
  • Jupyter Content Management Extensions使ってみた
  • KGIとKPIと細分化とその後の行動
  • MacOS tips
  • MySQLでIndexの確認
  • MySQLのLISTパーティションをRANGEパーティションに変更する定義文を生成するスクリプト
  • Notebookに複数のDataFrameを(水平に)出力する+displayについて
  • Project Template for R
  • Python(Windows)でファイル出力する際に改行コードをLFにする
  • PythonからRedshiftに接続
  • PythonからRを利用する方法
  • PythonでURL encode
  • Python以外 in jupyter notebook
  • R
  • octave
  • Hasklell
  • Scala
  • R tips
  • RStudio にあるpublishについて(shinyapps)
  • Radar Chart
  • Ruby One-liner
  • Rでの前処理として覚えたこと
  • Rで簡単に前処理+クロス集計+α
  • Rのseqを使って先月を求めるときの注意点
  • SQL tips
  • SeriesのDataFrame化とSeriesの結合
  • Tableau tutorial
  • python True/False/None
  • US keyboard Cheat Sheet
  • Upload package to PyPI By twine
  • Vagrantで立ち上げたVMにSCPでファイル転送
  • argparseのサブコマンドからのdispatchと引数の一致
  • awkの中でシェルで作成した変数を扱う
  • capture stdout in python
  • chatwork apiを試してみた
  • chocolateyでWindowsでもPackage管理
  • click試した
  • conda tips
  • copy to clip board and paste from cb
  • create new package project and open.md
  • data frame to dict(key=list)
  • decoratorメモ
  • docstringを書く気にさせる最低限のSphinx設定
  • dotenv in python/ipython
  • download binary files with requests
  • editR試した
  • faker サンプルデータ作成
  • fetch github user repositories with topics
  • git mergeでコンフリクトしたファイルを,mergeしたブランチのファイルで全て上書き
  • google search without domain
  • python handle byte/str io
  • iconv and nkf
  • idea plugins
  • import this と 部分適用
  • install mactex into yosemite
  • download mactex
  • install mecab and mecab-python3 on windows
  • sdk/mecab.h.patch
  • ipython とmodule reload と 設定ファイル
  • ipythonで使っているtimeitをpython code内で使ってみた
  • ipython/jupyter tips
  • jQueryで雑に処理してダウンロード weblio words
  • java, scalaの環境を整えすぎようとして消耗したのでメモ
  • javascript base64 on web browser
  • javascript basic authorization
  • jenkins memo
  • jq on windows
  • jupyter notebook extensions python-markdown(markdown + jinja2)
  • kaggle準備
  • qiita kobitoのデータとsqlite3
  • load_datasets_in_python
  • matplotlib tips
  • matplotlibの設定とcontext manager とmosaic plot
  • meshgridとcontourfを可視化して理解してみた
  • ndarrayの結合
  • not installed package names
  • note aws boto3 and wrapper
  • note jinja2 template engine
  • note: mecab + python
  • note: pandas.DataFrame/Series, 文字列を時間に変更する方法まとめ
  • note: vagrant VM/ansible/docker/serverspec(雑まとめ)
  • note: 行列の性質や数式テクニック
  • note:golang(install/path/package manager)
  • note: redshift query
  • notebook から他のファイル形式へのconvert(html/python/reveal.js slide)
  • numpy で 鶴亀算 とndarrayのmethod確認しようとして消耗したおまけ
  • numpyでk-meansを実装したときに使ったもの(Debug込み)
  • numpy/scipy distributions
  • pandasのoptionを一時的に変更
  • oracle on Mac OSX(VM ubuntu)
  • pandas window function関連と0.18.1の機能試した(+条件付きgroupby集計
  • pandas write to excel example とContetxt manager
  • pandas で read_s3 と to_s3
  • pandas.Series.applyでDataFrameを返す
  • pandas.read_htmlとlink(a.href)
    • 動機
    • データセットまとめ
    • 問題点
    • 解決方法
  • pandasで読み込めないExcelを無理やり読み込む
  • pandasの結果をJSONで渡すとき
  • pandas/numpy tips
  • pasty触ってみた
  • pd.options.mode.chained_assignment
  • perceptronの可視化
  • pickleとジョブフローのメモ
  • pyenvによる処理系の一元管理と環境の切り替え
  • python date_range (dateutil/pandas and offset aliasまとめ)
  • python datetime date(timestamp, weekday, etc.)
  • python logging
  • python packageでのz-score
  • python setup.(py|cfg) tox.ini .travis.yml
  • python tips
  • pythonでmultiprocess/threadとjoblib
  • python, decision treeのtree graph plot
  • python2の参考資料をpython3で実装する際に書き換えたもの
  • pythonでxml操作
  • pythonでzlib compress,base64 encodeと可逆変換
  • readthedocs memo(雑
  • request build schedule using requests(basic authorization/post and query)
  • run job and job history(雑)
  • sbt/activator雑まとめ
  • scatter plotだけを実現したいけど、おまけが邪魔だったので非表示にした
  • scikit-learn / scipy module と概要まとめ
  • seabornのdatasetのload場所
  • seabornのpairplotを実現しているPairGridのメモ
  • sessionize with pandas memo
  • shell tips
  • sqlalchemy_with_mssql
  • sub process stdout/pipe
  • sympyまとめた
  • matplotlib temporary styling
  • try javascript request
  • unique count without distinct
  • using 7zip from cli
  • windows+pythonでsftp
  • z chart
  • zipファイルの中身をextract使わずにファイルに書き出す
  • いまさらdirenv使ってみる
  • いまさらdjango触ってみた
  • いまさらflask使ってみた
  • アクティブなBookの全Sheetの一部をSummaryファイルにコピペする
  • ベイズの定理
  • 共役(conjugate)分布
  • パラメータ推定
  • 自己共役
  • 識別/生成モデル
  • 潜在変数
  • 混合分布
  • 回帰
  • 分類
  • グラフィカルモデル
  • chain/tree model
  • grid model
  • その他
  • コマンドラインからsqlworkbenchを使ってRedshiftからデータを取得する
  • シェルでの変数に対する操作
  • ストック用のbookmarklet
  • ファイルをN行に分割する
  • メモリ使用量を少なくしすぎて起動できなかった時の対処
  • ランダムデータと正規化・標準化
  • 今更ながらoddsとlogitとlogistic関数
  • 値と割合
  • 再帰中に高階関数が交じると混乱する -> 難しく考え過ぎ脳を分解するだけ
  • 定点観測のための集計と軸と指標
  • 改行の変換
  • 文字列からDataFrame作成(困ったらio.StringIO)
  • 最短マッチと含まない行マッチ
  • 期間(開始と終了)を持つPeriodを調べた
  • rpart
  • rpart-plot
  • fancyRpartPlot
  • partykit
  • 注釈テスト
  • 浮動小数点の誤差に関するメモ
  • 自作module test実行のためpip
  • 複数のcontext manager を扱う
  • 関数の実行順序の検証
  • 階級作成とDummy変数の作成
  • 集計/分析/機械学習の流れ
  • 飛行機本8章の練習問題こうしたほうがいい!という指摘大歓迎です
  • site
  • S3
  • interactive
  • jupyter_cms
  • magic_command
  • nbextensions
  • Calender
  • datascientist_mook_vol1
  • datasets-R
  • PyDataML
  • pyplot_animation
  • temprary_styling
  • numpy
  • numpy_色々
  • Standardize_other
  • concat_with_column_name
  • corr_pair_scatter
  • cut_and_dummy
  • datetime-series
  • df_to_str_and_zip_write_str
  • disply_multiple_dataframe
  • equals
  • execl
  • from_string
  • groupby
  • interpolate
  • new_pivot_unstack_melt_MultiIndex
  • pandoc_tabulate
  • time_series
  • window_function
  • zscore
  • py350
  • sparse_matrix
  • chi2_and_cramels_v
  • corr_ratio_fvalue
  • DecisionTree
  • KNN
  • LogisticRegression
  • kmeans
  • perceptron
  • softmax
  • PairGrid
  • VarianceThreshold
  • pipeline
  • roc_auc_learning_curve
  • sklearn_processing
  • sklern_samples_generator
  • 母平均の比較値との差のz検定
  • Statsmodel
  • sympy_sample
  • keras_example
gh-pages
  • Docs »
  • pandas.read_htmlとlink(a.href)
  • View page source

pandas.read_htmlとlink(a.href)¶

動機¶

  • データセットを探していた
  • データセットの詳細と適用可能な解析方法の組合せを見やすくしたかった

データセットまとめ¶

  • http://d.hatena.ne.jp/hoxo_m/20120214/p1 のテーブル部分
  • 2個目のテーブルが適用可能な手法とデータセットの対応表

問題点¶

テーブルの抽出といえばpandas.read_htmlであるが、データセットのダウンロードURLはリンク名しか取得できなかった

解決方法¶

  • Scraping
  • pyqueryがpython3対応されているとTwitterで見たので使ってみた
  • jQueryのようにCSSセレクタで対象を見つけて取得
  • https://gist.github.com/ksomemo/06e87d5cab6792c321de9027114503a4
Next Previous

© Copyright 2017, ksomemo.

Built with Sphinx using a theme provided by Read the Docs.
本サイトでは、サイトの分析と改善のためにGoogleアナリティクスを使用しています。
  • ユーザーが Google パートナーのサイトやアプリを使用する際の Google によるデータ使用
  • Google アナリティクスのセキュリティとプライバシー