title: Azure Function - Pandas dataframe to Excel, write to outputBlob stream
body: <p>Am trying to write a DataFrame to an outputBlob from an Azure Function. I'm having trouble figuring out which io stream to use.</p>
  <p>My function looks like this:</p>
  <pre><code>    import io
      import xlrd
      import pandas as pd
  
      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;)
      
          input_file = xlrd.open_workbook(file_contents = myblob.read())
          df = pd.read_excel(input_file)
          if not df.empty:
              output = io.BytesIO()
              outputBlob.set(runway1.to_excel(output))
  </code></pre>
  <p>How do we save the DataFrame to a stream that is recognisable by the Azure Function to write the excel to a Storage Container?</p>