tab complete dictionary keys in ipython

后端 未结 2 1975
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 09:24

I was wondering if anybody knows how to enable or implement tab completion for dictionary keys in IPython? It seems like it wouldn\'t be very different from functionality that

2条回答
  •  孤独总比滥情好
    2021-02-19 09:57

    IPython supports dict key completion for string keys since version 3.0.0 (despite not appearing in release notes), thanks to this patch. It also supports column name completion for numpy struct arrays and pandas DataFrame columns, and for other types that redefine __getitem__ through defining _ipython_key_completions_.

提交回复
热议问题