<?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 Re: Updating a csv file through a feature layer. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388633#M69997</link>
    <description>&lt;P&gt;An addition : I realized that running this script actually, generated the corresponding csv file on Arcgis Online. However, everytime I re-run this, it doesn't overwrite the csv file : it writes a new one. How can I make sure each time I run this script, the csv file is overwritten ? Also, is there a way I can write this csv file in a specific folder in Arcgis ? Thank you so much&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 11:20:26 GMT</pubDate>
    <dc:creator>OumaimaBoukamel95</dc:creator>
    <dc:date>2024-02-29T11:20:26Z</dc:date>
    <item>
      <title>Updating a csv file through a feature layer.</title>
      <link>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388191#M69987</link>
      <description>&lt;P&gt;Hello !&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a bit new to python in Arcgis, and I would need help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to update a csv automatically, based on a feature layer data. I am doing this currently by exporting the feature layer data manually, running a script that reads it, remove duplicates and writes a csv file in my folder and then I upload the file in Arcgis to update my arcgis online csv file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like this to be done in Arcgis Online automatically without having to run the treatment on my computer. I have the feeling the notebook functionality could help but I have no idea what would be an appropriate script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help ? Thank you in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 18:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388191#M69987</guid>
      <dc:creator>OumaimaBoukamel95</dc:creator>
      <dc:date>2024-02-28T18:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a csv file through a feature layer.</title>
      <link>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388227#M69988</link>
      <description>&lt;P&gt;This tutorial shows how to get a hosted feature service by searching for a name and by using it's ID value. It also shows writing a file to the notebook workspace storage.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/item.html?id=50e536565b474898849dcae596c62202" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=50e536565b474898849dcae596c62202&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This one shows using the Spatially Enabled Dataframe (a spatially extended version of a Pandas dataframe):&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.arcgis.com/home/item.html?id=30f62af60c9b4493bc3fa59d77209b2d" target="_blank"&gt;https://www.arcgis.com/home/item.html?id=30f62af60c9b4493bc3fa59d77209b2d&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The pandas to CSV functions there, so you can use that syntax.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html" target="_blank"&gt;https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Once you have a CSV in the Notebook storage space, you can keep it there, or if you need to be able to access it, you can publish it/overwrite one in ArcGIS Online.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/update-hosted-table-overwriting-it-with-local-csv/td-p/1078942" target="_blank"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/update-hosted-table-overwriting-it-with-local-csv/td-p/1078942&lt;/A&gt;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/part3-data-io-writing-data/" target="_blank"&gt;https://developers.arcgis.com/python/guide/part3-data-io-writing-data/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/samples/publishing-sd-shapefiles-and-csv/" target="_blank"&gt;https://developers.arcgis.com/python/samples/publishing-sd-shapefiles-and-csv/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 19:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388227#M69988</guid>
      <dc:creator>BobBooth1</dc:creator>
      <dc:date>2024-02-28T19:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a csv file through a feature layer.</title>
      <link>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388622#M69996</link>
      <description>&lt;P&gt;Thank you so much for your replay. I think I am almost there. I extracted data from survey123 in csv format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OumaimaBoukamel95_0-1709204612932.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96268iD2A08BE4B273FB13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OumaimaBoukamel95_0-1709204612932.png" alt="OumaimaBoukamel95_0-1709204612932.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, i would like to directly write the item ct_data in Arcgis, without having to write it on my local computer first : is it possible ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 11:04:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388622#M69996</guid>
      <dc:creator>OumaimaBoukamel95</dc:creator>
      <dc:date>2024-02-29T11:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Updating a csv file through a feature layer.</title>
      <link>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388633#M69997</link>
      <description>&lt;P&gt;An addition : I realized that running this script actually, generated the corresponding csv file on Arcgis Online. However, everytime I re-run this, it doesn't overwrite the csv file : it writes a new one. How can I make sure each time I run this script, the csv file is overwritten ? Also, is there a way I can write this csv file in a specific folder in Arcgis ? Thank you so much&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 11:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updating-a-csv-file-through-a-feature-layer/m-p/1388633#M69997</guid>
      <dc:creator>OumaimaBoukamel95</dc:creator>
      <dc:date>2024-02-29T11:20:26Z</dc:date>
    </item>
  </channel>
</rss>

