Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade pandas on google colab

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?

like image 297
Daniel Chepenko Avatar asked Oct 31 '18 14:10

Daniel Chepenko


People also ask

How do I update pandas on Google Colab?

You can either use pip install command to upgrade the version of the python package (in this case pandas) or if you are using conda you can use conda install to upgrade Pandas.

What version of pandas does Google colab use?

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

How do I install pandas on Google Colab?

To start, log into your Google Account and go to Google Drive. Click on the New button on the left and select Colaboratory if it is installed (if not click on Connect more apps, search for Colaboratory and install it). From there, import Pandas as shown below (Colab has it installed already).


1 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__
like image 103
Scott Boston Avatar answered Oct 28 '22 08:10

Scott Boston