How to upgrade pandas on google colab

Question:

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

When I want to install the latest version using

!pip install pandas==0.23.4

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.

How should I upgrade properly?

Asked By: Daniel Chepenko

||

Answers:

You need to restart the kernel.

!pip install pandas==0.23.4

Restart Google Runtime In toolbar go to

Runtime->Restart Runtime…

Then try

import pandas as pd
pd.__version__
Answered By: Scott Boston

This is the newest version:

! pip install pandas==0.25
Answered By: Amirali