โ10-28-2022 06:47 AM
Hi, I want to run
df=pd.read_csv('/dbfs/FileStore/airlines1.csv') while trying to run getting error like
FileNotFoundError: [Errno 2] No such file or directory: '/dbfs/FileStore/airlines1.csv'
Could you please help me out how to run pandas dataframe inside databricks or we can not run pandas dataframe directly inside databricks?
โ10-28-2022 07:21 AM
@Tinendra Kumarโ we have been seeing this issue, but as far as documentation i don't see any solid base why pandas read won't support. but we do have workaround 1. read your csv using spark and store in data frame 2. convert spark data frame to pandas . below links will help 1. CSV file | Databricks on AWS 2. Convert a spark DataFrame to pandas DF - Stack Overflow
โ11-10-2022 08:01 PM
Thanks, Karthik
โ10-31-2022 11:24 AM
Hi @Tinendra Kumarโ,
I would like to share the following documentation https://docs.databricks.com/languages/pandas-spark.html#pandas-api-on-spark This is Pandas APIs on Spark.
Pandas does not scale out to big data (runs on driver only). Pandas API on Spark fills this gap by providing pandas equivalent APIs that work on Apache Spark. Pandas API on Spark is useful not only for pandas users but also PySpark users, because pandas API on Spark supports many tasks that are difficult to do with PySpark, for example plotting data directly from a PySpark DataFrame.
โ11-10-2022 07:48 PM
Thank you Jose
โ11-20-2022 06:09 PM
Hi,
I don't see any incorrect in your code, I think your code is correct. Could you check the exist of your file or enable dbfs in your workspace?
โ01-08-2023 09:10 PM
Hi @Tinendra Kumarโ
Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.
We'd love to hear from you.
Thanks!
โ02-14-2023 04:10 AM
Hi @Vidula Khannaโ
Yes, my query has been resolved and I got the solution. Thanks for your support.
Thanks,
Tinendra
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