Pandas will No Longer Support Python 2 Next Year

Pranav Dar Last Updated : 17 Apr, 2018
2 min read

Overview

  • Pandas will drop support for Python 2 from 1st January, 2019
  • This comes after Python’s core team announced they will stop support for Python 2.7 from 2020 onwards
  • Recent survey revealed almost 47% users are still using Python 2 so this will affect a large number of developers

 

Introduction

Pandas is one of the most common and popular python libraries out there. It provides fast and incredibly flexible data structures that make working with data really easy and straightforward. It’s essentially the first library you learn about when you start with Python.

Starting from 1st January 2019, pandas will no longer be supporting Python 2. This means that the final release before December 31st, 2018 will the last ever to support Python 2 and all releases post that will be for Python 3 only. This has been announced in line with python core team’s decision to drop support for Python 2.7 from 1st January, 2020 onwards.

 

Note here that pandas will NOT stop working – instead it will stop pushing out bug fixes, security enhancements and new features to the older version of Python. This will only be possible if someone outside the developer team volunteers to do it.

A recently conducted survey revealed that a massive 47% of users are still using Python 2 so they will have to switch over to the latest version very soon. A lot of other packages have also decided to drop their support for Python 2 recently, so this will just expedite the process.

You can read their official announcement on GitHub here.

 

Our take on this

The reaction to this announcement has been mixed on social media. While a few people argue that they shouldn’t be forced to upgrade their version, most folks understand the need for this change. By dropping support for Python 2, it becomes easier and more streamlined for developers and people maintaining the latest version. Another case to be made is that if the support isn’t removed, then users will not have a lot of incentive to upgrade.

But moving your scripts from Python 2 to 3 has seen the code break for a few people so be wary when you make the move. You can check out this link to learn more about porting your code from Python 2 to 3.

What are your thoughts on this? Will you be affected by this move?

 

Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!

 

Senior Editor at Analytics Vidhya.Data visualization practitioner who loves reading and delving deeper into the data science and machine learning arts. Always looking for new ways to improve processes using ML and AI.

Responses From Readers

Clear

Dr Howard B Bandy
Dr Howard B Bandy

I agree with the decision for both Python and Pandas support to be exclusively Python 3. About four years ago, I compared Python 2 with Python 3 in preparation for a major project. At that time, there were a few libraries that I planned to use that were compatible only with Python 2. That project was done using Python 2. I revisited that comparison recently and found that now all of the libraries I need are compatible with Python 3. I have switched to Python 3 for all new work. Support is a major expense for every software organization. Focusing efforts on one platform allows a higher level of support and lower costs. When support for Python 2 is discontinued, that does not mean that Python 2 will no longer work. Projects implemented using Python 2 will continue to run. Developers who wish to continue to use those programs can create a virtual environment devoted to precisely the program modules with specific versions they require.

We use cookies essential for this site to function well. Please click to help us improve its usefulness with additional cookies. Learn about our use of cookies in our Privacy Policy & Cookies Policy.

Show details