cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

pd.read_csv failed

THIAM_HUATTAN
Valued Contributor
3 REPLIES 3

Hubert-Dudek
Esteemed Contributor III

Pandas will not see dbfs storage this way. You need to change to pandas on spark or use the classic path.

import pyspark.pandas as pd
pd.read_csv("dbfs:/your_path/your_file.csv")
 
import pandas as pd
pd.read_csv("/dbfs/your_path/your_file.csv")

THIAM_HUATTAN
Valued Contributor

Thanks for your kind reply:

Below works for me:

https://imgur.com/BmMzatI

But why, as you mentioned, using the classic path, below does not work?

https://imgur.com/Ba1a4Iv

Hi @THIAM HUAT TANโ€‹ ,

Just a friendly follow-up. Did any of the responses help you to resolve your question? if it did, please mark it as best. Otherwise, please let us know if you still need help.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group