Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R中全局(??)帮助部分的Python等价物_Python_R - Fatal编程技术网

R中全局(??)帮助部分的Python等价物

R中全局(??)帮助部分的Python等价物,python,r,Python,R,python与R全局搜索的等价物是什么(??),它将给出所有包的结果,我来自R背景,在python帮助/搜索中发现困难,就像我想检查pandas的“nunique”函数功能一样,我使用下面的代码 nunique()? nunique? help(nunique) help(nunique()) pydoc -k nunique() pydoc -k nunique 没有任何东西给出结果,也没有在我不知道模块/软件包时如何搜索。我发现这些都是有用的命令 # help on build in f

python与R全局搜索的等价物是什么(??),它将给出所有包的结果,我来自R背景,在python帮助/搜索中发现困难,就像我想检查pandas的“nunique”函数功能一样,我使用下面的代码

nunique()?
nunique?
help(nunique)
help(nunique())
pydoc -k nunique()
pydoc -k nunique

没有任何东西给出结果,也没有在我不知道模块/软件包时如何搜索。

我发现这些都是有用的命令

#  help on build in function 'len'
help(len) 
#  list of all help
dir(len) 
#  help on build in function 'len'
len? 
# a package specific help, here pd is pandas
help(pd.unique)  

您只需要指定完整路径,以便python知道您正在谈论的是什么函数帮助(pandas.Series.nunique)谢谢您的回复,但为此,我需要知道完整的层次结构,如pandas>Series then searched模块,我们是否有任何可以直接搜索的功能如果导入了该函数,那么您只需调用帮助即可。否则,就我所知,没有全局层次结构搜索。顺便说一句,你什么时候会需要这样的东西呢?事实上,我对python还不熟悉,从在线材料中学习东西,所以我不太习惯它的软件包等。在R中,我们只需要使用??它将列出所有找到此类函数的包…我在这里查找此类函数,无论如何…我将使用Hierarchy我认为只有help()和dir()(…检查模块中的内容)。