[Python] How to import functions that I created in a Python file into a Notebook in Databricks

Discussão em 'Python' iniciado por Stack, Julho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I have several Notebooks and I have some functions that are common to them. To reuse these functions, I created a Python file in the Databricks directory and tried to import these functions into my Notebook. But an import error occurs. If I tried locally, it would probably work, but using Databricks, I don't know if it's possible to import these functions declared this way. Is there any way I can do this or am I really unable to do this type of import in Databricks?

    I created a Python file in the Databricks directory and tried to import in a notebook in the same place

    Continue reading...

Compartilhe esta Página