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.