<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>amaebin510</author_name>
  <author_url>https://blog.hatena.ne.jp/amaebin510/</author_url>
  <blog_title>あまえびんのメモ帳</blog_title>
  <blog_url>https://amaebin.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>pandasで個人的によく使うデータ前処理するときの関数をまとめました。 データ抽出 条件から代入する時 列削除 データをくっつける インデックスのリセット データをソートする 型の変換 カテゴリ型をダミー化 欠損値処理 データ抽出 列抽出 dfからfeature_1とfeature_2のみ取り出す train.loc[:,[feature_1,feature_2]] dfからfeature列の0以下のもの行を表示 df.loc[df[feature] &lt; 0] 条件から代入する時 df.loc[df['A'] % 2 == 0, 'C'] = 'even' df.loc[df['B'] % …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Famaebin.hatenablog.com%2Fentry%2F2020%2F01%2F31%2F212650&quot; title=&quot;【python】pandasでよく使うデータ前処理文法 - あまえびんのメモ帳&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-01-31 21:26:50</published>
  <title>【python】pandasでよく使うデータ前処理文法</title>
  <type>rich</type>
  <url>https://amaebin.hatenablog.com/entry/2020/01/31/212650</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
