<?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 do you read files from the DBFS with OS and Pandas Python libraries? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/55592#M30376</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;db_path &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;file:///Workspace/Users/l&amp;lt;xxxxx&amp;gt;@databricks.com/TITANIC_DEMO/tested.csv&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;df &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; spark.read.csv(db_path, &lt;/SPAN&gt;&lt;SPAN&gt;header&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;inferSchema&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 21 Dec 2023 10:38:02 GMT</pubDate>
    <dc:creator>User16789202230</dc:creator>
    <dc:date>2023-12-21T10:38:02Z</dc:date>
    <item>
      <title>How do you read files from the DBFS with OS and Pandas Python libraries?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10261#M5481</link>
      <description>&lt;P&gt;I created translations for decoded values and want to save the dictionary object the DBFS for mapping. However, I am unable to access the DBFS without using dbutils or PySpark library. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to access the DBFS with OS and Pandas Python libraries? At work, we can directly use the same path as the PySpark functions to write/ read from the DBFS without issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Confirm files exist within DBFS&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/746i8BEF8D930A8E07EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Confirm ability to read file with PySpark&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/735i422EBBFF0B94510A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Error 1 - recommends using "/dbfs" instead of "dbfs:"&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/745i86343C13D87A61A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Updated "/dbfs" - error persists&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/741iF0FC17B4052303E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Removed DBFS entirely:&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/756i8F0A0039D5EFF2F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;and one last shot....&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/740iA6233D7684D170BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 13:20:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10261#M5481</guid>
      <dc:creator>MattPython</dc:creator>
      <dc:date>2023-02-01T13:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you read files from the DBFS with OS and Pandas Python libraries?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10262#M5482</link>
      <description>&lt;P&gt;Hi @Matthew LIbonati​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please check again, I tried in the exact same way and initially faced the error as mentioned in point 3, then changed it to as mentioned in point 4, can able to see the data without any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Learning!!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 03:13:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10262#M5482</guid>
      <dc:creator>Chaitanya_Raju</dc:creator>
      <dc:date>2023-02-02T03:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you read files from the DBFS with OS and Pandas Python libraries?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10263#M5483</link>
      <description>&lt;P&gt;Hi @Matthew LIbonati​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope everything is going great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2023 03:06:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10263#M5483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-09T03:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you read files from the DBFS with OS and Pandas Python libraries?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10264#M5484</link>
      <description>&lt;P&gt;Hi @Vidula Khanna​&amp;nbsp;, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having the same issue (using Community Edition). I am aware that in CE, DBFS is not mounted to /dbfs root directory. Is this the cause? If so, that is the alternative?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Apr 2023 20:03:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/10264#M5484</guid>
      <dc:creator>Johny</dc:creator>
      <dc:date>2023-04-29T20:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do you read files from the DBFS with OS and Pandas Python libraries?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/55592#M30376</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;db_path &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;file:///Workspace/Users/l&amp;lt;xxxxx&amp;gt;@databricks.com/TITANIC_DEMO/tested.csv&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;df &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; spark.read.csv(db_path, &lt;/SPAN&gt;&lt;SPAN&gt;header&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;inferSchema&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Dec 2023 10:38:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-do-you-read-files-from-the-dbfs-with-os-and-pandas-python/m-p/55592#M30376</guid>
      <dc:creator>User16789202230</dc:creator>
      <dc:date>2023-12-21T10:38:02Z</dc:date>
    </item>
  </channel>
</rss>

