如何在Google Colab上升级 pandas [英] How to upgrade pandas on google colab

查看:255
本文介绍了如何在Google Colab上升级 pandas 的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,在Google Colab环境中已预先安装了pandas.但是它使用的版本不是最新版本.

As I understand in Google Colab environment pandas is pre-installed. However the version it use it's not the recent one.

import pandas as pd
pd.__version__
>>0.22.0

当我想使用

!pip install pandas==0.23.4

即使日志消息提到0.22.0已成功卸载,它仍然使用0.22.0版本而不是新版本.

It is still use the 0.22.0 version instead of a new, even though the log message mentioned that 0.22.0 was successfully uninstalled.

我应该如何正确升级?

推荐答案

您需要重新启动内核.

!pip install pandas==0.23.4

重新启动Google Runtime在工具栏中,转到

Restart Google Runtime In toolbar go to

运行时->重新启动运行时...

Runtime->Restart Runtime...

然后尝试

import pandas as pd
pd.__version__

这篇关于如何在Google Colab上升级 pandas 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆