<?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: Pandas DataFrame error when using to_csv in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/pandas-dataframe-error-when-using-to-csv/m-p/34810#M25527</link>
    <description>&lt;P&gt;f = open("/dbfs/mnt/blob/myNames.txt", "r")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2023 07:31:19 GMT</pubDate>
    <dc:creator>Avinash_94</dc:creator>
    <dc:date>2023-04-14T07:31:19Z</dc:date>
    <item>
      <title>Pandas DataFrame error when using to_csv</title>
      <link>https://community.databricks.com/t5/data-engineering/pandas-dataframe-error-when-using-to-csv/m-p/34809#M25526</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to a Pandas Dataframe to /dbfs/FileStore/ using to_csv method.&lt;/P&gt;&lt;P&gt;Usually it would just write the Dataframe to the path described but It has been giving me "FileNotFoundError: [Errno 2] No such file or directory: '/dbfs/FileStore/test.csv".&lt;/P&gt;&lt;P&gt;I have tried &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.to_csv("/dbfs/FileStore/test.csv", header= None, index= None)
&amp;nbsp;
df.to_csv("dbfs/FileStore/test.csv", header=None, index=None)
&amp;nbsp;
df.to_csv("dbfs:/FileStore/test.csv", header=None, index=None)
&amp;nbsp;
df.to_csv("/FileStore/test.csv", header=None, index=None)
&amp;nbsp;
df.to_csv("FileStore/test.csv", header=None, index=None)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But all give out the same error.&lt;/P&gt;&lt;P&gt;using dbutils i see that the folder are present.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.fs.ls("dbfs:/FileStore")
&amp;nbsp;
Out[32]: [FileInfo(path='dbfs:/FileStore/tables/', name='tables/', size=0, modificationTime=0)]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am new here and i tried searching the problem for a long time but I can't find a solution. Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 05:40:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pandas-dataframe-error-when-using-to-csv/m-p/34809#M25526</guid>
      <dc:creator>afzi</dc:creator>
      <dc:date>2022-08-11T05:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pandas DataFrame error when using to_csv</title>
      <link>https://community.databricks.com/t5/data-engineering/pandas-dataframe-error-when-using-to-csv/m-p/34810#M25527</link>
      <description>&lt;P&gt;f = open("/dbfs/mnt/blob/myNames.txt", "r")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 07:31:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pandas-dataframe-error-when-using-to-csv/m-p/34810#M25527</guid>
      <dc:creator>Avinash_94</dc:creator>
      <dc:date>2023-04-14T07:31:19Z</dc:date>
    </item>
  </channel>
</rss>

