python-3.x - 如何在 google colab 上删除本地上传的文件?

标签 python-3.x keras jupyter-notebook google-colaboratory

我正在尝试使用以下代码删除我在 Google colab 上上传的文件:

from google.colab import files
uploaded = files.upload()

现在如何删除文件?例如,如果文件名是 'sample.jpg' 。

最佳答案

尝试这个

!rm sample.jpg

然后检查它是否消失了 !ls -al
更新(2018 年 11 月)
现在您可以单击打开左 Pane ,浏览文件选项卡,然后右键单击以选择并删除文件。

关于python-3.x - 如何在 google colab 上删除本地上传的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52265978/

相关文章:

python-3.x - 无法连接到 HTTPS URL,因为 SSL 模块不可用

python-3.x - 将 emacs python 模式解释器更改为 python3.5

python - pandas 或 python 相当于 tidyr complete

machine-learning - "ValueError: When feeding symbolic tensors to a model, we expect the tensors to have a static batch size"是什么意思?

python - 导入错误 : DLL load failed: The specified module could not be found in python

python - 将新的永久列添加到数据框python

javascript - 导入 Jupyter Notebook 时,D3 4.0+ 不会创建全局 d3 变量

python - 比较两个列表的元素

python - Keras - 查找嵌入

python - 如何从嵌入层获取输出