title: How to edit a *.csv file in the azure blob storage with an azure function?
body: <p>I am working with Azure at the moment and I am unhappy with the predefined functions in the DataFactory because they start a Cluster in the background and this is absolutely not necessary for my problem.</p>
  <p>I receive a csv file in a predefined folder and want to pick a set of columns and store them in a certain order in a csv file.</p>
  <p>At the moment my file looks as follows:</p>
  <p>The JSON file:</p>
  <pre><code>  &quot;bindings&quot;: [
      {
        &quot;name&quot;: &quot;myblob&quot;,
        &quot;type&quot;: &quot;blobTrigger&quot;,
        &quot;path&quot;: &quot;input-raw&quot;,
        &quot;connection&quot;: &quot;AzureWebJobsStorage&quot;,
        &quot;direction&quot;: &quot;in&quot;
      },
      {
        &quot;name&quot;: &quot;outputblob&quot;,
        &quot;type&quot;: &quot;blob&quot;,
        &quot;path&quot;: &quot;{blobTrigger}-copy&quot;,  
        &quot;connection&quot;: &quot;AzureWebJobsStorage&quot;,
        &quot;direction&quot;: &quot;out&quot;
      }
    ],
    &quot;disabled&quot;: false,
    &quot;scriptFile&quot;: &quot;__init__.py&quot;
  }
  
  </code></pre>
  <p>The <strong>init</strong>.py:</p>
  <pre><code>import logging
  import azure.functions as func
  
  def main(myblob: func.InputStream, outputblob: func.Out[func.InputStream]):
      logging.info(f&quot;Python blob trigger function processed blob \n&quot;
                   f&quot;Name: {myblob.name}\n&quot;
                   f&quot;Blob Size: {myblob.length} bytes&quot;)
      outputblob.set(myblob)
  </code></pre>
  <p>My function picks a file in the folder and copies it with a '-copy' in the end in the same folder.
  Is there an easy way to access the data and to edit it with python?</p>
  <p>Toll now I tried the packages 'csv', 'io' and 'fileinput' to read the information but I could not manage till now to edit or even see the data within my VisualStudioCode.</p>
  <p>If you need more information please let me know.</p>
  <p>Best
  P</p>