
Explanation:
The first line of a Databricks Python notebook when viewed in a text editor is a special comment that identifies the file as a Databricks notebook. This line is always # Databricks notebook source for Python notebooks. Other options like // (Scala) or -- (SQL) are used for notebooks in those languages, but the question specifically refers to a Python notebook. Magic commands like %python or # MAGIC %python appear in cell content, not as the first line of the notebook file.
No comments yet.
What is the initial line of code displayed in a Databricks Python notebook when opened in a text editor?
A
%python
B
// Databricks notebook source
C
# Databricks notebook source
D
-- Databricks notebook source
E
# MAGIC %python