Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Issues executing notebook using custom databricks library uploaded

I have been trying to process xml content using pyspark and dataframes as per the solution in the post https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous 

     

    A simple workaround is to use Pandas to read data from the xml file into a Pandas dataframe, then convert the Pandas dataframe into a Spark dataframe. For example, 

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!