はじめに 文字列処理に関する3種類の自作関数を紹介します。 具体的には、主に以下の2点を目的としています。 ・正規表現の円滑な適用 ・英字 / かな / カナ / 漢字 / 数字 の識別 ☆ 02/26 時点で全体構成を刷新しました。 下準備
pandas ではデータを 列 や 表形式のデータ構造として扱うが、これらのデータから順番に値を取得 (イテレーション) して何か操作をしたい / また 何らかの関数を適用したい、ということがよくある。このエントリでは以下の 3 つについて整理したい。 イテレーション 関数適用 pipe (0.16.2 で追加) それぞれ、Series、DataFrame、GroupBy (DataFrame.groupbyしたデータ) で可能な操作が異なるため、順に記載する。 まずは必要なパッケージを import する。 import numpy as np import pandas as pd イテレーション Series Series は以下 2つのイテレーション用メソッドを持つ。各メソッドの挙動は以下のようになる。 __iter__: Series の値 ( values ) のみをイテレーシ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く