<?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 Hi i have uploaded excel file in databricks but it shows different language. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95186#M39050</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have attach one excel file in data bricks edition but unfortunately it shows a diiferent langaue in ouput whice i wrote display(df). below im attaching the screenshot please let me now thanking you in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ziy_41_0-1729504438295.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12106iE7D12DA2466AB7CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ziy_41_0-1729504438295.png" alt="Ziy_41_0-1729504438295.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2024 09:59:44 GMT</pubDate>
    <dc:creator>Ziy_41</dc:creator>
    <dc:date>2024-10-21T09:59:44Z</dc:date>
    <item>
      <title>Hi i have uploaded excel file in databricks but it shows different language.</title>
      <link>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95186#M39050</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have attach one excel file in data bricks edition but unfortunately it shows a diiferent langaue in ouput whice i wrote display(df). below im attaching the screenshot please let me now thanking you in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ziy_41_0-1729504438295.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12106iE7D12DA2466AB7CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ziy_41_0-1729504438295.png" alt="Ziy_41_0-1729504438295.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 09:59:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95186#M39050</guid>
      <dc:creator>Ziy_41</dc:creator>
      <dc:date>2024-10-21T09:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hi i have uploaded excel file in databricks but it shows different language.</title>
      <link>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95190#M39051</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/128295"&gt;@Ziy_41&lt;/a&gt;&amp;nbsp;When loading the file, try explicitly setting the encoding&lt;/P&gt;&lt;LI-CODE lang="python"&gt;.option("encoding", "UTF-8")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 10:12:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95190#M39051</guid>
      <dc:creator>Panda</dc:creator>
      <dc:date>2024-10-21T10:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Hi i have uploaded excel file in databricks but it shows different language.</title>
      <link>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95364#M39085</link>
      <description>&lt;P&gt;CSV and Excel are not the same datatype.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can load the excel data into a pandas dataframe and then convert it to a pyspark dataframe.&lt;BR /&gt;&lt;BR /&gt;first, you have to install the openpyxl library&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install openpyxl&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then import PySpark Pandas:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pyspark.pandas as ps&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And then read the excel-data into a df:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;path = "/Volumes/demo/raw/files/FinancialsSampleData.xlsx"

# create pandas-df
pdf_sheet1 = ps.read_excel(path, sheet_name="Financials1")

#convert pandas-df to pyspark-df
df_sheet1 = pdf_sheet1.to_spark()
display(df_sheet1)&lt;/LI-CODE&gt;&lt;P&gt;Your df should look like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="df_sheet_1.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12140i4160458A00948778/image-size/large?v=v2&amp;amp;px=999" role="button" title="df_sheet_1.png" alt="df_sheet_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 19:35:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/hi-i-have-uploaded-excel-file-in-databricks-but-it-shows/m-p/95364#M39085</guid>
      <dc:creator>Stefan-Koch</dc:creator>
      <dc:date>2024-10-21T19:35:49Z</dc:date>
    </item>
  </channel>
</rss>

