我遇到了一个问题similar to this user:当对df.col.
调用autocomplete时,即使对只包含df.col
的单元格求值,我也得不到自动完成。例如,我希望看到df.col.str.matc
自动完成到df.col.str.match
。我能做些什么来解决这个问题?在
以以下数据帧为例:
import pandas as pd
data = [['Alex in FL','ten'],['Bob in FLORIDA','five'],['Will in GA','three']]
df = pd.DataFrame(data,columns=['Name','Age'])
#Dataframe:
Name Age
0 Alex in FL ten
1 Bob in FLORIDA five
2 Will in GA three
#Command that should autocomplete (but does not):
df.Name.str.matc [+TAB]
我不想尝试hinterland,因为我只想在按tab键时自动完成。在
提前谢谢你!在
在阅读了this之后,这个问题似乎是其他人和ipython的特定版本所面临的。在这个环节上也给出了解决方案。在
是这样的:
从终端运行以下命令:
它将在
~/.ipython/profile_default/ipython_config.py
处创建一个默认配置文件现在编辑这个
^{pr2}$ipython_config.py
,并添加下面的行,它将解决这个问题。在参考文献:
相关问题 更多 >
编程相关推荐