Skip to content

Instantly share code, notes, and snippets.

@zonca
Created December 11, 2025 18:10
Show Gist options
  • Select an option

  • Save zonca/3a60b36f4cf5f9c5f9d0863a51c21813 to your computer and use it in GitHub Desktop.

Select an option

Save zonca/3a60b36f4cf5f9c5f9d0863a51c21813 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"id": "a3148d1c",
"metadata": {},
"source": [
"# My Jupytext Example\n",
"\n",
"This is a simple Python script meant to be converted to a Jupyter Notebook using Jupytext."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8b142b45",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"\n",
"data = {'col1': [1, 2], 'col2': [3, 4]}\n",
"df = pd.DataFrame(data)\n",
"print(df)"
]
},
{
"cell_type": "markdown",
"id": "558c9b3c",
"metadata": {},
"source": [
"This is another markdown cell."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b9c0c766",
"metadata": {},
"outputs": [],
"source": [
"print(\"DataFrame multiplied by 2:\")\n",
"print(df * 2)"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
# %% [markdown]
# # My Jupytext Example
#
# This is a simple Python script meant to be converted to a Jupyter Notebook using Jupytext.
# %%
import pandas as pd
data = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data)
print(df)
# %% [markdown]
# This is another markdown cell.
# %%
print("DataFrame multiplied by 2:")
print(df * 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment