TheRealJimShady
TheRealJimShady

Reputation: 917

Using PySpark Pandas to read in filename with a space in it

trying to read this file:

abfss://[email protected]/perils_database/Bushfire AUSTRALIA - PERILS Industry Exposure Database 2023.xlsx

Using this Python code:

import pyspark.pandas as ps

input_file = "abfss://[email protected]/perils_database/Bushfire AUSTRALIA - PERILS Industry Exposure Database 2023.xlsx"

ps.read_excel(input_file)

I get this error:

IllegalArgumentException: Illegal character in path at index 97: abfss://[email protected]/perils_database/Bushfire AUSTRALIA - PERILS Industry Exposure Database 2023.xlsx

Because the file path has spaces in it. I'm unsure how to fix this using PySpark Pandas. Help?

Upvotes: 0

Views: 94

Answers (0)

Related Questions