Python’s status as the fastest-growing programming language is being fuelled by a sharp uptick in its use for data science.
The link has been established by a new analysis by Stack Overflow, the Q&A hub that is home to the world’s largest online developer community.
While Python is a versatile language, Stack Overflow found one use case stood out. Among visitors reading Python-tagged questions, there was a far greater rise in the proportion viewing questions related to data science, than those related to web development or systems administration.
This pattern is evident below, where Stack Overflow has classified Python developers as being data scientists, web developers or sysadmins/DevOps, based on the question tags they visit frequently. The data scientists account for the rapidly climbing blue line, the largely flat orange line reflects the web developers, and the purple line the sysadmins. The criteria for these Stack Overflow users being labelled as a “Python developer” is that they primarily visit Python-tagged questions.
“We can see that the number of Python visitors who work with web technologies or system administration is growing at a slow or moderate pace in the last three years, out of all visitors to Stack Overflow,” says Stack Overflow data scientist David Robinson.
“But the share of Python developers who are visiting data science technologies is growing very rapidly. This suggests that Python’s popularity in data science and machine learning is probably the main driver of its fast growth.”
If trends in the graph are to be believed, then while data science is driving Python’s growth, web development still accounts for the bulk of the interest in the language, although possibly not for much longer.
For finer detail, Stack Overflow broke down which Python-related frameworks and software libraries visitors were most interested in, with strong showings for the data science-related NumPyand matplotlib alongside pandas, and mixed interest in the web frameworks Django and Flask.
Robinson told TechRepublic this ballooning growth in interest in Python doesn’t appear to be at the expense of other languages, particularly in the field of data science.
“Its most notable competition in that field is R, which has been growing just as rapidly during this time period,” he says.
“Thus, far from Python displacing R, I think the two complement each other while the entire field expands.”
Jacqueline Kazil, board director of the Python Software Foundation (PSF), predicted Python’s popularity will continue grow, as the language’s accessibility and utility continue to be attractive to researchers carrying out analytics.
By analysing visitors by industry, Stack Overflow determined that those viewing Python-related questions are most commonly involved in academia, followed by electronics, manufacturing and software industries.
“However, Python’s growth is spread pretty evenly across industries. In combination this tells a story of data science and machine learning becoming more common in many types of companies, and Python becoming a common choice for that purpose,” says Robinson.