Skip to content

Instantly share code, notes, and snippets.

@blakeNaccarato
Last active May 8, 2025 18:16
Show Gist options
  • Select an option

  • Save blakeNaccarato/64be8dd40acbc6ccc12697a0fa70c123 to your computer and use it in GitHub Desktop.

Select an option

Save blakeNaccarato/64be8dd40acbc6ccc12697a0fa70c123 to your computer and use it in GitHub Desktop.
VSCode Data Wrangler setup

VSCode Data Wrangler setup

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  • Create a folder e.g. hello_world
  • Copy the contents of pyproject.toml below to e.g. hello_world/
  • Copy the contents of settings.json below to e.g. hello_world/.vscode
  • Create a virtual environment and install the requirements
uv venv
uv sync
  • Download and move hello.ipynb below into hello_world/ and re-run it
  • The notebook output for dataframes is handled by Data Wrangler, enabled by dataWrangler.outputRenderer.enabled in settings.json

image

  • You can also click "Open 'df' in Data Wrangler" to open the dataframe in a dedicated tab
  • Basic column sorting and filtering is available in "Viewing" mode, and advanced operations can make changes to the dataframe in "Editing" mode, the resulting code can be copied by clicking "Preview code for all steps" in the bottom-left corner of the Data Wrangler sidebar menu.

image

  • You can also view data files this way, not just in notebooks. In settings.json, toggle support for additional filetypes (including csv) in dataWrangler.enabledFileTypes.
  • Also, dataWrangler.panels.displayOnTabFocus controls whether the sidebar or console panel pop up when opening a Data Wrangler tab.
  • Configuring editor associations e.g. like "workbench.editorAssociations": { "file:/**/*.csv": "jupyter-data-wrangler" } means CSVs open in a Data Wrangler tab by default. The source file text can be opened by clicking the "page with arrow" icon in the top-right of the tab bar.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[project]
name = "hello_world"
version = "0.0.0"
requires-python = ">=3.11"
dependencies = []
[dependency-groups]
dev = [
# ? For VSCode Jupyter notebooks and Data Wrangler
"ipykernel==6.29.5",
"pandas-stubs==2.2.3.*",
"pandas==2.2.3",
"pyarrow==17.0.0",
"pyspark==3.5.5",
]
[tool.uv.pip]
python-version = "3.11"
{
"dataWrangler.defaultViewingFilterOptions": "advanced",
"dataWrangler.experiments.autoDetectCsvDelimiter": true,
"dataWrangler.experiments.copilot.enabled": true,
"dataWrangler.experiments.datatypes.pyspark": true,
"dataWrangler.experiments.fastCsvParsing": true,
"dataWrangler.outputRenderer.columnInsights.displayByDefault": true,
"dataWrangler.outputRenderer.enabled": true,
"dataWrangler.outputRenderer.enabledTypes": { "pandas.core.frame.DataFrame": true },
"dataWrangler.outputRenderer.pagination.defaultSize": 10,
"dataWrangler.panels.displayOnTabFocus": true,
"dataWrangler.useRelativePath": true,
"workbench.editorAssociations": { "file:/**/*.csv": "jupyter-data-wrangler" }
"dataWrangler.enabledFileTypes": {
"csv": true,
"jsonl": true,
"parquet": true,
"tsv": true,
"xls": true,
"xlsx": true
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment