简体   繁体   English

在IPython笔记本中选择文件

[英]Selecting files in IPython notebooks

Is there a good way for me to select files on the host file-system through the IPython notebook? 我是否可以通过IPython Notebook在主机文件系统上选择文件? I was hoping for some sort of widget based solution. 我希望有一种基于小部件的解决方案。

For example, I want to train a machine learning algorithm using some files, and I want to be able to select which CSV files to use for training. 例如,我想使用一些文件来训练机器学习算法,并且希望能够选择用于训练的CSV文件。

there are no widget (yet) but maybe you will do it :-) otherwise on *nix like with IPython you can do things like : 还没有小部件(但),但是也许您会做到的:-)否则,在* nix上,例如使用IPython,您可以执行以下操作:

files = !ls *.train.csv
for f in files:
  ...

and it will do what you expect 它会做您期望的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM