<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>soratokimitonoaidani</author_name>
  <author_url>https://blog.hatena.ne.jp/soratokimitonoaidani/</author_url>
  <blog_title>子供の落書き帳 Renaissance</blog_title>
  <blog_url>https://linus-mk.hatenablog.com/</blog_url>
  <categories>
    <anon>pandas</anon>
    <anon>Python</anon>
  </categories>
  <description>pandasで、 ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series というエラーが出ることがある。 結論をいうと、これは空のDataFrameに対してapply()をしたときに発生するエラーである。 そうなら「エラー：DataFrameが空だよ!」とか言ってくれればよいのだが、エラーから原因が推測しづらいので難しい。 空の（0行の）DataFrameにapplyをするとエラーになる import pandas as pd pd.__versi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flinus-mk.hatenablog.com%2Fentry%2F2020%2F03%2F05%2F235059&quot; title=&quot;pandasで空のDataFrameにapply()してエラーになった - 子供の落書き帳 Renaissance&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-03-05 23:50:59</published>
  <title>pandasで空のDataFrameにapply()してエラーになった</title>
  <type>rich</type>
  <url>https://linus-mk.hatenablog.com/entry/2020/03/05/235059</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
