<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anton0825</author_name>
  <author_url>https://blog.hatena.ne.jp/anton0825/</author_url>
  <blog_title>日々精進</blog_title>
  <blog_url>https://anton0825.hatenablog.com/</blog_url>
  <categories>
    <anon>AI</anon>
  </categories>
  <description>pd.concat([df1, df2], axis=&quot;comuns&quot;) のようにして列方向に連結する場合、df1とdf2のindexが同じ行同士を結合させるので、indexの値が揃ってないと例えば「df1にあった列はすべてnanでdf2にあった列にだけ値が入っている行」とかが出来てしまう。 reset_index()を実行してからconcatした方が安全。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F2022%2F07%2F30%2F000000_1&quot; title=&quot;pd.concatでDataFrameを列方向に連結する場合、indexが揃っているか確認する - 日々精進&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>2022-07-30 00:00:00</published>
  <title>pd.concatでDataFrameを列方向に連結する場合、indexが揃っているか確認する</title>
  <type>rich</type>
  <url>https://anton0825.hatenablog.com/entry/2022/07/30/000000_1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
