
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This package manages the conversion between .ipynb (Jupyter Notebook) and .py (Python script) files, which Databricks automatically performs when exporting notebooks.
A command-line tool for converting between Databricks .py script files and .ipynb notebooks. This tool was build in collaboration with Yoyodyne-Data-Science, thank you for setting the foundations for this tool.
When working with Databricks, notebooks are often exported as .py files for easier version control and collaboration. However, these scripts may not be ideal for local development in VS Code. nb2dbpy bridges this gap by enabling seamless conversion between Databricks-formatted Python scripts and Jupyter notebooks directly from the command line.
Clone the repository and install the required dependencies:
pip install nb2dbpy
Use nb2dbpy from the command line to perform conversions.
To convert a Databricks-exported Python script to a Jupyter notebook:
nb2dbpy your_python_script.py
This command will generate your_python_script.ipynb in the same directory.
To convert a Jupyter notebook into a Databricks-compatible Python script:
nb2dbpy your_notebook.ipynb
This will create your_notebook.py, ready for import into Databricks.
You can specify a custom output file name using the -o or --output option:
nb2dbpy input_file.py -o custom_output.ipynb
If the output file already exists, the tool will find the next available filename, for example, if you already have created test.py from test.ipynb, the tool with next create test(1).py to protect against overwriting.
Suppose you have a file analysis.py exported from Databricks. To convert it to a Jupyter notebook:
nb2dbpy analysis.py
Open analysis.ipynb with VS Code to continue your work locally.
You have developed a notebook experiment.ipynb and now want to run it in Databricks:
nb2dbpy experiment.ipynb
Upload the resulting experiment.py to your Databricks workspace.
This project is licensed under the MIT License.
Contributions are welcome! Please open issues or submit pull requests for improvements and bug fixes.
FAQs
This package manages the conversion between .ipynb (Jupyter Notebook) and .py (Python script) files, which Databricks automatically performs when exporting notebooks.
We found that nb2dbpy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.