A plugin for neovim to render pandas dataframes in nvim-dap using the power of visidata.
- Requires nvim-dap
- Requires visidata to be available in the active python environment
- Install like any other neovim plugin:
# Using: lazy
{
"Willem-J-an/visidata.nvim",
dependencies = {
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui"
},
config = function()
local dap = require("dap")
dap.defaults.fallback.external_terminal = {
command = "<Path to your terminal of choice>",
args = { "--hold", "--command" },
}
vim.keymap.set("v", "<leader>vp", require('visidata').visualize_pandas_df, { desc = "[v]isualize [p]andas df" })
end,
}
- Configure an external-terminal for nvim-dap
- Configure a keymap to execute the visualize_pandas_df function.
- Configure your dap session to use externalTerminal:
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
}
- Debug your code as usual, load a pandas dataframe, add a breakpoint after it.
- Select the pandas dataframe and execute the keymap.