How to import excel files xls/xlsx file into Databricks python notebook?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 05:03 AM
Method 1: Using "com.crealytics.spark.excel" package, how do I import the package?
Method 2: Using pandas I tried the possible paths, but file not found it shows, nor while uploading the xls/xlsx file it shows options for importing the dataframe.
Help is appreciated
Thanks
Labels:
- Labels:
-
Spark
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 09:23 AM - edited 02-28-2024 09:26 AM
import pandas as pd
ExcelData = pd.read_excel("/dbfs"+FilePath, sheetName) # make sure you add /dbfs to FilePath

