Spyder:按下 Tab 键时如何仅显示数据框列?
我正在从matlab
切换到python
,我正面临第一个障碍。 :)
我有以下代码:
import pandas as pd
T = pd.read_csv("MyFile.csv", sep=';')
到目前为止,很好,但是我有两个问题:
- 在控制台中:当我键入
t。
时,然后我点击tab
,我获取 all dataframe的列以及 asl 我可以在t
上执行的可能命令。我应该如何才能列出 dataFrame列? - 在编辑器中:当我键入
t。
后面是选项卡
时,需要很长时间才能看到列出的任何内容。
我希望以下行为:当我键入t。
然后点击选项卡
(或其他键)时,我将列出唯一的然后,我可以使用键盘上的箭头键选择数据框。
我在Windows 10
上使用Spyder 5.1.5
通过Anaconda安装,我还安装了JEDI
已安装不过是活动的,但是在spyder
的底部,我可以看到lsp python:ready
)。
I am switching from Matlab
to Python
and I am facing the first hurdles. :)
I have the following code:
import pandas as pd
T = pd.read_csv("MyFile.csv", sep=';')
So far, so good, but I have two problems:
- In the console: when I type
T.
and then I hitTAB
, I get listed all the columns of the dataframe along with all the possible commands that I can perform onT
. How should I do to get listed only the dataframe columns? - In the editor: when I type
T.
followed byTAB
, it takes long time before I see anything listed.
I wish the following behavior: when I type T.
and then I hit TAB
(or some other key) I shall get listed only the columns of the dataframe that I can then select by using the arrow keys on my keyboard.
I am running on Windows 10
with Spyder 5.1.5
installed through Anaconda and I also have jedi
installed (but I don't know if it is active though, but on the bottom of Spyder
I can see LSP Python: ready
).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您需要
列名称
。方法如下:或者简单地说:
此外,到目前为止,可能无法使用箭头键或任何其他键获取列名称。
我不太清楚你第二个问题的原因是什么。您可以查看这个。尽管它是关于 MacOS 的,但它可能会有所帮助。
I guess you need
Column names
. Here's how:Or simply:
Also, till now there might be no way to get column names with arrow keys or any other key.
I don't exactly know what could be the reason for your second question. You can take a look at this. Even though it's about MacOS but it might help.