Updating Python related course material

Some python courses are based on python 2. This isn’t a big problem but when you take python’s skill paths or the Data science course, topics from these courses get included, it becomes a headache to work between them without learning python 2.
Python 2 is not that useful now because everyone is shifting towards python 3. Also, Python has already received it’s 3.9 update.

Due to these reasons, I suggest that the learning material for python related courses or skill paths should be updated to use python 3.

Hi,

I think all the python 2 material is the free material to study. The CC pro stuff is all Python 3.

1 Like

No.
Several Courses like Learn Data Analysis with Pandas, Learn Statistics with NumPy, etc. are all python 2 and come under Pro Courses. Also the lessons in these courses are there in Data Science Pro Path, Analyze Data with Python, Visualize data with Python Skill Path are ALSO PRO PATHS.

Hello! Could you provide a link to these courses?

It is fair to say that many sections of the paths available only on PRO still run scripts with Python2 (a lot of the data work with numpy, pandas and matplotlib still do)-
https://www.codecademy.com/paths/data-science/tracks/dscp-data-manipulation-with-pandas/modules/dscp-hands-on-with-pandas/lessons/pandas-i/exercises/inspect-dataframe

Most of the time it’s barely noticeable. A few things are missing or different but I’m not sure it’s a huge issue. If there are specific lessons where it causes significant issues then it might be worth pointing them out.

3 Likes

It wasn’t a big problem but when I started this project, it did become a pain as I didn’t know that in python 2 we had to convert number to float to get a decimal number where quotient would be 0. I have just started the next section, which is on pandas (Course Link) and right now can’t say what is coming next.
P.S. with different versions of python the syntax used in libraries is also different. Where in python 3 we can use or and and inside function calls.
For eg,

import codecademylib
import pandas as pd

df = pd.DataFrame([
  ['January', 100, 100, 23, 100],
  ['February', 51, 45, 145, 45],
  ['March', 81, 96, 65, 96],
  ['April', 80, 80, 54, 180],
  ['May', 51, 54, 54, 154],
  ['June', 112, 109, 79, 129]],
  columns=['month', 'clinic_east',
           'clinic_north', 'clinic_south',
           'clinic_west'])

march_april = df[(df.month == 'March') | (df.month == 'April')]

print(march_april)

Here in the second last line, inside the getter attribute of df we use | only for python 2, (& also available). Whereas, in python 3 we can use or and and. This is not only the case with pandas but also with matplotlib and numpy