<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Received Type Error on Esri Python API Course in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496127#M70901</link>
    <description>&lt;P&gt;I am currently on ArcGIS Pro 3.3 and I am learning how to make a line chart through a Spatially Exported Data Frame (SEDF) using their ArcGIS Pro Python API, but I keep getting an error from using the .set_index object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd
from arcgis.features import GeoAccessor, GeoSeriesAccessor
import matplotlib.pyplot as plt

# add the magic command to keep charts inline
%matplotlib inline

sedf = pd.DataFrame.spatial.from_featureclass(r'G:\share_file\avargas\Esri Training\VisualPythonAPI\VisualPythonAPI\FirePoints.gdb\FireEvents_MT')

wildfires_df = sedf[sedf["CauseCat"] == "Natural"]

wildfires_by_month = wildfires_df.set_index("StartDate").groupby(pd.Grouper(freq='M')).count()
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2024 19:00:22 GMT</pubDate>
    <dc:creator>AvigailVargas</dc:creator>
    <dc:date>2024-06-21T19:00:22Z</dc:date>
    <item>
      <title>Received Type Error on Esri Python API Course</title>
      <link>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496127#M70901</link>
      <description>&lt;P&gt;I am currently on ArcGIS Pro 3.3 and I am learning how to make a line chart through a Spatially Exported Data Frame (SEDF) using their ArcGIS Pro Python API, but I keep getting an error from using the .set_index object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd
from arcgis.features import GeoAccessor, GeoSeriesAccessor
import matplotlib.pyplot as plt

# add the magic command to keep charts inline
%matplotlib inline

sedf = pd.DataFrame.spatial.from_featureclass(r'G:\share_file\avargas\Esri Training\VisualPythonAPI\VisualPythonAPI\FirePoints.gdb\FireEvents_MT')

wildfires_df = sedf[sedf["CauseCat"] == "Natural"]

wildfires_by_month = wildfires_df.set_index("StartDate").groupby(pd.Grouper(freq='M')).count()
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 19:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496127#M70901</guid>
      <dc:creator>AvigailVargas</dc:creator>
      <dc:date>2024-06-21T19:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Received Type Error on Esri Python API Course</title>
      <link>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496135#M70903</link>
      <description>&lt;P&gt;What exactly is the error you're getting? Can you paste the full text?&lt;/P&gt;&lt;P&gt;When you make a Grouper object, try explicitly stating the key. I don't really understand why the index is being set prior to grouping.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wildfires_by_month = wildfires_df.groupby(pd.Grouper(freq='M', key='StartDate')).count()&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 19:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496135#M70903</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-06-21T19:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Received Type Error on Esri Python API Course</title>
      <link>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496139#M70904</link>
      <description>&lt;P&gt;This is a screenshot of the error I am getting:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AvigailVargas_0-1718998250824.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107692i54AC2D29CEB838ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AvigailVargas_0-1718998250824.png" alt="AvigailVargas_0-1718998250824.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm really just following an online lesson plan, but it is clearly outdated. I tried using the line of code you suggested but nothing really changed, I get the same exact error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 19:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/received-type-error-on-esri-python-api-course/m-p/1496139#M70904</guid>
      <dc:creator>AvigailVargas</dc:creator>
      <dc:date>2024-06-21T19:36:21Z</dc:date>
    </item>
  </channel>
</rss>

