<?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: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14055#M8607</link>
    <description>&lt;P&gt;Please mount ADLS storage as described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/s/feed/0D53f00001eQGOHCA4" target="test_blank"&gt;https://community.databricks.com/s/feed/0D53f00001eQGOHCA4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then write pandas to excel to that directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df.to_excel("output.xlsx") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2023 15:33:30 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2023-01-02T15:33:30Z</dc:date>
    <item>
      <title>How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14051#M8603</link>
      <description />
      <pubDate>Mon, 02 Jan 2023 09:08:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14051#M8603</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2023-01-02T09:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14052#M8604</link>
      <description>&lt;P&gt;Can you please share the code snippet?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 10:35:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14052#M8604</guid>
      <dc:creator>daniel_sahal</dc:creator>
      <dc:date>2023-01-02T10:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14053#M8605</link>
      <description>&lt;P&gt;Currently, as per my understanding, there is no support available in databricks to write into excel file using python. Suggested solution would be to convert pandas Dataframe to spark Dataframe and then use Spark Excel connector to write into excel files. This&amp;nbsp;&lt;A href="http://www.yuzongbao.com/2019/07/29/handling-excel-data-in-azure-databricks/" alt="http://www.yuzongbao.com/2019/07/29/handling-excel-data-in-azure-databricks/" target="_blank"&gt;link&lt;/A&gt;&amp;nbsp;explains the details clearly for the same requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 13:56:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14053#M8605</guid>
      <dc:creator>ramravi</dc:creator>
      <dc:date>2023-01-02T13:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14054#M8606</link>
      <description>&lt;P&gt;hey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to authenticate the abfss&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Configure authentication
service_credential = dbutils.secrets.get(scope="&amp;lt;scope&amp;gt;",key="&amp;lt;service-credential-key&amp;gt;")
 
spark.conf.set("fs.azure.account.auth.type.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net", "OAuth")
spark.conf.set("fs.azure.account.oauth.provider.type.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
spark.conf.set("fs.azure.account.oauth2.client.id.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net", "&amp;lt;application-id&amp;gt;")
spark.conf.set("fs.azure.account.oauth2.client.secret.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net", service_credential)
spark.conf.set("fs.azure.account.oauth2.client.endpoint.&amp;lt;storage-account&amp;gt;.dfs.core.windows.net", "https://login.microsoftonline.com/&amp;lt;directory-id&amp;gt;/oauth2/token")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check out below two links:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/external-data/azure-storage.html" target="test_blank"&gt;https://docs.databricks.com/external-data/azure-storage.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/_static/notebooks/adls-gen2-service-principal.html" target="test_blank"&gt;https://docs.databricks.com/_static/notebooks/adls-gen2-service-principal.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 15:00:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14054#M8606</guid>
      <dc:creator>sher</dc:creator>
      <dc:date>2023-01-02T15:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14055#M8607</link>
      <description>&lt;P&gt;Please mount ADLS storage as described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/s/feed/0D53f00001eQGOHCA4" target="test_blank"&gt;https://community.databricks.com/s/feed/0D53f00001eQGOHCA4&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then write pandas to excel to that directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df.to_excel("output.xlsx") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 15:33:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14055#M8607</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2023-01-02T15:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14056#M8608</link>
      <description>&lt;P&gt;Hi @Hubert Dudek​,&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Pandas API doesn't support abfss protocol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have three options:&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you need to use pandas, you can write the excel to the local file system (dbfs) and then move it to ABFSS (for example with dbutils)&lt;/LI&gt;&lt;LI&gt;Write as csv directly in abfss with the Spark API (without using pandas)&lt;/LI&gt;&lt;LI&gt;Write the dataframe as excel with the Spark API directly in abfss with a library like &lt;A href="https://github.com/crealytics/spark-excel" alt="https://github.com/crealytics/spark-excel" target="_blank"&gt;https://github.com/crealytics/spark-excel&lt;/A&gt;. (without using pandas)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Fernando Arribas&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 21:25:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14056#M8608</guid>
      <dc:creator>FerArribas</dc:creator>
      <dc:date>2023-01-02T21:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14057#M8609</link>
      <description>&lt;P&gt;But once you mount it, you can write as it is visible as a dbfs directory.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 08:57:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14057#M8609</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2023-01-03T08:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14058#M8610</link>
      <description>&lt;P&gt;Have you tried writing to the local file system (for example, in the path /databricks/...​)&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Anyway, i recommend you to tyr writing with Spark (without dataframes). Pandas without additional libraries, doesn't distribute and with high volumes you will have memory problems, performance problems...&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:16:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14058#M8610</guid>
      <dc:creator>FerArribas</dc:creator>
      <dc:date>2023-01-03T13:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14059#M8611</link>
      <description>&lt;P&gt;so for that we don't have a option to add background color and not able to autofit the rows and columns​&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:16:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14059#M8611</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2023-01-03T13:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14060#M8612</link>
      <description>&lt;P&gt;It is enough to use pandas on a spark, so it is distributed. Additionally, pandas have the to_excel method, but spark data-frames do not.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:17:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14060#M8612</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2023-01-03T13:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14061#M8613</link>
      <description>&lt;P&gt;i done that, but in spark df not able​ to add bg color and cell alignment based on values in excel sheet&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:22:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14061#M8613</guid>
      <dc:creator>databicky</dc:creator>
      <dc:date>2023-01-03T13:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14062#M8614</link>
      <description>&lt;P&gt;I'm not sure about that. When you call the function to_excel all the data is loaded into the driver (as if you were doing a collect). So, the writing is not distributed and you can have memory and performance problems as I mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot_1"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/936iBF062844B5AFED83/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1" alt="Screenshot_1" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.to_excel.html" alt="https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.to_excel.html" target="_blank"&gt;https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/api/pyspark.pandas.DataFrame.to_excel.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try writing with this library:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/crealytics/spark-excel" target="test_blank"&gt;https://github.com/crealytics/spark-excel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example (https://github.com/crealytics/spark-excel/issues/134#issuecomment-517696354):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df.write&lt;/P&gt;&lt;P&gt;  .format("com.crealytics.spark.excel")&lt;/P&gt;&lt;P&gt;  .save("test.xlsx")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:51:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14062#M8614</guid>
      <dc:creator>FerArribas</dc:creator>
      <dc:date>2023-01-03T13:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is showing error as protocol not known 'abfss' like that.</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14063#M8615</link>
      <description>&lt;P&gt;Under the general scenario this shouldn't be an issue since an Excel file can only handle a little over a million rows anyway. Saying that, your statement that this should be written to dbfs and use dbutils to move the file to abfs should be the accepted answer.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 21:55:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/14063#M8615</guid>
      <dc:creator>Jfoxyyc</dc:creator>
      <dc:date>2023-01-04T21:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can we write a pandas dataframe into azure adls as excel file, when trying to write it is sh</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/88809#M37619</link>
      <description>&lt;P&gt;how can I know the path in dbfs where the file is written?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from the Workspace I have tried with&lt;/P&gt;&lt;P&gt;path&lt;/P&gt;&lt;P&gt;URLpath&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 00:54:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-we-write-a-pandas-dataframe-into-azure-adls-as-excel/m-p/88809#M37619</guid>
      <dc:creator>AngelBalcazar13</dc:creator>
      <dc:date>2024-09-06T00:54:41Z</dc:date>
    </item>
  </channel>
</rss>

