In [1]:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
In [2]:
#Завантаження дата сетів та первинний аналіз даних
In [3]:
sr_public= pd.read_csv("E:/ДЗ/survey_results_public.csv",low_memory=False)
In [4]:
sr_schema = pd.read_csv("E:/ДЗ/survey_results_schema.csv")
In [5]:
sr_public.head()
Out[5]:
| ResponseId | MainBranch | Age | EdLevel | Employment | EmploymentAddl | WorkExp | LearnCodeChoose | LearnCode | LearnCodeAI | ... | AIAgentOrchestration | AIAgentOrchWrite | AIAgentObserveSecure | AIAgentObsWrite | AIAgentExternal | AIAgentExtWrite | AIHuman | AIOpen | ConvertedCompYearly | JobSat | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | I am a developer by profession | 25-34 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Employed | Caring for dependents (children, elderly, etc.) | 8.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | Vertex AI | NaN | NaN | NaN | ChatGPT | NaN | When I don’t trust AI’s answers | Troubleshooting, profiling, debugging | 61256.0 | 10.0 |
| 1 | 2 | I am a developer by profession | 25-34 years old | Associate degree (A.A., A.S., etc.) | Employed | NaN | 2.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | When I don’t trust AI’s answers;When I want to... | All skills. AI is a flop. | 104413.0 | 9.0 |
| 2 | 3 | I am a developer by profession | 35-44 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Independent contractor, freelancer, or self-em... | None of the above | 10.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | ChatGPT;Claude Code;GitHub Copilot;Google Gemini | NaN | When I don’t trust AI’s answers;When I want to... | Understand how things actually work, problem s... | 53061.0 | 8.0 |
| 3 | 4 | I am a developer by profession | 35-44 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Employed | None of the above | 4.0 | Yes, I am not new to coding but am learning ne... | Other online resources (e.g. standard search, ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | ChatGPT;Claude Code | NaN | When I don’t trust AI’s answers;When I want to... | NaN | 36197.0 | 6.0 |
| 4 | 5 | I am a developer by profession | 35-44 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Independent contractor, freelancer, or self-em... | Caring for dependents (children, elderly, etc.) | 21.0 | No, I am not new to coding and did not learn n... | NaN | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | When I don’t trust AI’s answers | critical thinking, the skill to define the tas... | 60000.0 | 7.0 |
5 rows × 172 columns
In [6]:
sr_public.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 49191 entries, 0 to 49190 Columns: 172 entries, ResponseId to JobSat dtypes: float64(52), int64(1), object(119) memory usage: 64.6+ MB
list(sr_public.columns)
In [7]:
sr_schema.head()
Out[7]:
| qid | qname | question | type | sub | sq_id | |
|---|---|---|---|---|---|---|
| 0 | QID18 | TechEndorse_1 | What attracts you to a technology or causes yo... | RO | AI integration or AI Agent capabilities | 1.0 |
| 1 | QID18 | TechEndorse_2 | What attracts you to a technology or causes yo... | RO | Easy-to-use API | 2.0 |
| 2 | QID18 | TechEndorse_3 | What attracts you to a technology or causes yo... | RO | Robust and complete API | 3.0 |
| 3 | QID18 | TechEndorse_4 | What attracts you to a technology or causes yo... | RO | Customizable and manageable codebase | 4.0 |
| 4 | QID18 | TechEndorse_5 | What attracts you to a technology or causes yo... | RO | Reputation for quality | 5.0 |
In [8]:
sr_schema.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 139 entries, 0 to 138 Data columns (total 6 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 qid 139 non-null object 1 qname 139 non-null object 2 question 139 non-null object 3 type 139 non-null object 4 sub 49 non-null object 5 sq_id 49 non-null float64 dtypes: float64(1), object(5) memory usage: 6.6+ KB
In [9]:
#Завдання 1. Підрахунок загальної кількості респондентів
In [10]:
sr_public['ResponseId'].nunique()
Out[10]:
49191
In [11]:
#Завдання 2. Аналіз повноти відповідей респондентів
In [12]:
sr_schema['qname'].isna().sum()
Out[12]:
np.int64(0)
In [13]:
questions = set(sr_schema['qname'].unique())
In [14]:
sr_public_1 = set(sr_public.columns)
In [15]:
columns = questions & sr_public_1
In [16]:
all_set = sr_public.loc[:,list(columns)]
all_set
Out[16]:
| AIThreat | AIAgent_Uses | JobSatPoints_13 | YearsCode | DevEnvHaveEntry | TechOppose_15_TEXT | SO_Actions_9 | DatabaseChoice | JobSatPoints_1 | CommPlatformHaveEntr | ... | AIAgents | AIAgentKnowWrite | TechOppose_5 | TechEndorseIntro | AIModelsWantEntry | WebframeChoice | LanguagesHaveEntry | JobSatPoints_5 | DevType | EmploymentAddl | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | I'm not sure | Software engineering | 13.0 | 14.0 | NaN | NaN | 8.0 | Yes | 3.0 | NaN | ... | Yes, I use AI agents at work monthly or infreq... | NaN | 12.0 | Work | NaN | No | NaN | 5.0 | Developer, mobile | Caring for dependents (children, elderly, etc.) |
| 1 | I'm not sure | NaN | 13.0 | 10.0 | NaN | NaN | 9.0 | Yes | 10.0 | NaN | ... | No, and I don't plan to | NaN | 10.0 | Personal Project | NaN | Yes | NaN | 12.0 | Developer, back-end | NaN |
| 2 | No | Software engineering | 13.0 | 12.0 | NaN | NaN | 7.0 | Yes | 9.0 | NaN | ... | Yes, I use AI agents at work weekly | NaN | 12.0 | Work | NaN | Yes | NaN | 8.0 | Developer, front-end | None of the above |
| 3 | No | Software engineering | 13.0 | 5.0 | NaN | NaN | 8.0 | No | 1.0 | NaN | ... | Yes, I use AI agents at work monthly or infreq... | NaN | 4.0 | Personal Project | NaN | Yes | NaN | 6.0 | Developer, back-end | None of the above |
| 4 | No | NaN | 12.0 | 22.0 | NaN | NaN | 10.0 | Yes | 9.0 | NaN | ... | No, and I don't plan to | NaN | 9.0 | Work | NaN | Yes | NaN | 14.0 | Engineering manager | Caring for dependents (children, elderly, etc.) |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 49186 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 49187 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | Caring for dependents (children, elderly, etc.) |
| 49188 | No | NaN | 11.0 | 31.0 | NaN | NaN | NaN | NaN | 3.0 | NaN | ... | No, I use AI exclusively in copilot/autocomple... | NaN | 7.0 | Personal Project | NaN | NaN | NaN | 4.0 | Architect, software or solutions | None of the above |
| 49189 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | None of the above |
| 49190 | NaN | NaN | NaN | 6.0 | NaN | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | Student | Attending school (full-time) |
49191 rows × 126 columns
In [17]:
all_set.shape
Out[17]:
(49191, 126)
In [18]:
complete_respondents_alt = all_set.dropna().shape[0]
complete_respondents_alt
#В результаті аналізу було виявлено, що жоден респондент не надав відповіді на всі питання опитування
Out[18]:
0
list(all_set.columns)
In [19]:
#Завдання 3. Статистичний аналіз досвіду респондентів
In [20]:
print('Середнє значення:',sr_public['WorkExp'].mean().round(2))
print('Медіана:', sr_public['WorkExp'].median())
print('Мода:',sr_public['WorkExp'].mode().iloc[0])
Середнє значення: 13.37 Медіана: 10.0 Мода: 10.0
In [21]:
#Завдання 4. Аналіз віддаленої роботи
In [22]:
sr_public['RemoteWork'].value_counts().reset_index()
Out[22]:
| RemoteWork | count | |
|---|---|---|
| 0 | Remote | 10931 |
| 1 | Hybrid (some remote, leans heavy to in-person) | 6732 |
| 2 | In-person | 6042 |
| 3 | Hybrid (some in-person, leans heavy to flexibi... | 5831 |
| 4 | Your choice (very flexible, you can come in wh... | 4244 |
In [23]:
Remote = (sr_public['RemoteWork'] == 'Remote').sum()
print('Кількість людей, яка працює віддалено складає:',Remote)
Кількість людей, яка працює віддалено складає: 10931
In [24]:
#Завдання 5. Визначення популярності Python
In [25]:
[col for col in sr_public.columns if 'Language' in col]
Out[25]:
['LanguageChoice', 'LanguageHaveWorkedWith', 'LanguageWantToWorkWith', 'LanguageAdmired', 'LanguagesHaveEntry', 'LanguagesWantEntry']
In [26]:
sr_public['LanguageHaveWorkedWith'].head(20)
Out[26]:
0 Bash/Shell (all shells);Dart;SQL 1 Java 2 Dart;HTML/CSS;JavaScript;TypeScript 3 Java;Kotlin;SQL 4 C;C#;C++;Delphi;HTML/CSS;Java;JavaScript;Lua;P... 5 Java;Scala 6 JavaScript;TypeScript 7 Bash/Shell (all shells);HTML/CSS;JavaScript;Py... 8 Java;Python;Scala 9 NaN 10 HTML/CSS;Java;JavaScript;SQL;TypeScript 11 C# 12 HTML/CSS;JavaScript;TypeScript 13 NaN 14 NaN 15 Ada;Assembly;C;C#;C++;COBOL;Dart;Delphi;Elixir... 16 NaN 17 HTML/CSS;JavaScript;Python;SQL 18 Bash/Shell (all shells);Java;JavaScript;Perl;T... 19 Python Name: LanguageHaveWorkedWith, dtype: object
In [27]:
sr_public['worked_with_python'] = (sr_public['LanguageHaveWorkedWith'].str.contains('Python', case=False, na=False))
In [28]:
python = sr_public['worked_with_python'].sum()
python
Out[28]:
np.int64(18466)
In [29]:
total = sr_public.shape[0]
total
Out[29]:
49191
In [30]:
python_percentage = ((python / total) * 100).round(2)
print(f"Python використовують {python_percentage}% респондентів")
Python використовують 37.54% респондентів
In [31]:
#Завдання 6. Аналіз шляхів навчання програмуванню
In [32]:
[col for col in sr_public.columns if 'Learn' in col]
Out[32]:
['LearnCodeChoose', 'LearnCode', 'LearnCodeAI', 'AILearnHow']
In [33]:
sr_public['LearnCode'].head(10)
Out[33]:
0 Online Courses or Certification (includes all ... 1 Online Courses or Certification (includes all ... 2 Online Courses or Certification (includes all ... 3 Other online resources (e.g. standard search, ... 4 NaN 5 Online Courses or Certification (includes all ... 6 Videos (not associated with specific online co... 7 Books / Physical media;Technical documentation... 8 Online Courses or Certification (includes all ... 9 Other online resources (e.g. standard search, ... Name: LearnCode, dtype: object
In [34]:
sr_public['learned_with_online_courses'] = (sr_public['LearnCode'].str.contains('Online Courses', case=False, na=False))
In [35]:
online_courses = sr_public['learned_with_online_courses'].sum()
In [36]:
print(f"{online_courses} респондентів навчалося програмувати за допомогою онлайн курсів.")
10973 респондентів навчалося програмувати за допомогою онлайн курсів.
In [37]:
sr_public
Out[37]:
| ResponseId | MainBranch | Age | EdLevel | Employment | EmploymentAddl | WorkExp | LearnCodeChoose | LearnCode | LearnCodeAI | ... | AIAgentObserveSecure | AIAgentObsWrite | AIAgentExternal | AIAgentExtWrite | AIHuman | AIOpen | ConvertedCompYearly | JobSat | worked_with_python | learned_with_online_courses | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | I am a developer by profession | 25-34 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Employed | Caring for dependents (children, elderly, etc.) | 8.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | ChatGPT | NaN | When I don’t trust AI’s answers | Troubleshooting, profiling, debugging | 61256.0 | 10.0 | False | True |
| 1 | 2 | I am a developer by profession | 25-34 years old | Associate degree (A.A., A.S., etc.) | Employed | NaN | 2.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I don’t trust AI’s answers;When I want to... | All skills. AI is a flop. | 104413.0 | 9.0 | False | True |
| 2 | 3 | I am a developer by profession | 35-44 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Independent contractor, freelancer, or self-em... | None of the above | 10.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | ChatGPT;Claude Code;GitHub Copilot;Google Gemini | NaN | When I don’t trust AI’s answers;When I want to... | Understand how things actually work, problem s... | 53061.0 | 8.0 | False | True |
| 3 | 4 | I am a developer by profession | 35-44 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Employed | None of the above | 4.0 | Yes, I am not new to coding but am learning ne... | Other online resources (e.g. standard search, ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | ChatGPT;Claude Code | NaN | When I don’t trust AI’s answers;When I want to... | NaN | 36197.0 | 6.0 | False | False |
| 4 | 5 | I am a developer by profession | 35-44 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Independent contractor, freelancer, or self-em... | Caring for dependents (children, elderly, etc.) | 21.0 | No, I am not new to coding and did not learn n... | NaN | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I don’t trust AI’s answers | critical thinking, the skill to define the tas... | 60000.0 | 7.0 | True | False |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 49186 | 49187 | I code primarily as a hobby | 18-24 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Employed | NaN | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | False | False |
| 49187 | 49188 | I am a developer by profession | 45-54 years old | Some college/university study without earning ... | Employed | Caring for dependents (children, elderly, etc.) | 25.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools req... | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | False | True |
| 49188 | 49189 | I am a developer by profession | 35-44 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Employed | None of the above | 17.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 9.0 | False | True |
| 49189 | 49190 | I am a developer by profession | 25-34 years old | Professional degree (JD, MD, Ph.D, Ed.D, etc.) | Independent contractor, freelancer, or self-em... | None of the above | 2.0 | Yes, I am not new to coding but am learning ne... | Videos (not associated with specific online co... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | False | False |
| 49190 | 49191 | I am not primarily a developer, but I write co... | 18-24 years old | Some college/university study without earning ... | Student | Attending school (full-time) | NaN | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | False | True |
49191 rows × 174 columns
In [38]:
#Завдання 7. Географічний аналіз компенсації Python-розробників
In [39]:
work_python = sr_public[sr_public['worked_with_python'] == True]
In [40]:
work_python.shape
Out[40]:
(18466, 174)
In [41]:
work_python.head()
Out[41]:
| ResponseId | MainBranch | Age | EdLevel | Employment | EmploymentAddl | WorkExp | LearnCodeChoose | LearnCode | LearnCodeAI | ... | AIAgentObserveSecure | AIAgentObsWrite | AIAgentExternal | AIAgentExtWrite | AIHuman | AIOpen | ConvertedCompYearly | JobSat | worked_with_python | learned_with_online_courses | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 5 | I am a developer by profession | 35-44 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Independent contractor, freelancer, or self-em... | Caring for dependents (children, elderly, etc.) | 21.0 | No, I am not new to coding and did not learn n... | NaN | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I don’t trust AI’s answers | critical thinking, the skill to define the tas... | 60000.0 | 7.0 | True | False |
| 7 | 8 | I am a developer by profession | 35-44 years old | Professional degree (JD, MD, Ph.D, Ed.D, etc.) | Employed | Engaged in paid work (20-29 hours per week);Tr... | 22.0 | Yes, I am not new to coding but am learning ne... | Books / Physical media;Technical documentation... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I want to learn best practices;When I wan... | Innovation, system design | 72000.0 | 6.0 | True | False |
| 8 | 9 | I am a developer by profession | 25-34 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Employed | Caring for dependents (children, elderly, etc.... | 9.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | 70000.0 | 8.0 | True | True |
| 15 | 16 | I am a developer by profession | 18-24 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Student | Engaged in paid work (20-29 hours per week);En... | 5.0 | Yes, I am new to coding or currently a student | Online Courses or Certification (includes all ... | No, I learned something that was not related t... | ... | Galileo;Honeycomb;Metero;New Relic;opik;Snyk | NaN | ChatGPT;AgentGPT;Auto-GPT;Devin AI;Glean (Ente... | NaN | When I don’t trust AI’s answers;When I have et... | 5 | NaN | 7.0 | True | True |
| 17 | 18 | I am a developer by profession | 25-34 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Employed | NaN | 1.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I want to learn best practices;When I hav... | NaN | NaN | 6.0 | True | True |
5 rows × 174 columns
In [42]:
work_python['Country'].isna().sum()
Out[42]:
np.int64(0)
In [43]:
python_comp = work_python[['Country', 'ConvertedCompYearly']].dropna(subset=['ConvertedCompYearly'])
In [44]:
python_comp.isna().sum()
Out[44]:
Country 0 ConvertedCompYearly 0 dtype: int64
In [45]:
program_country = python_comp.groupby('Country')['ConvertedCompYearly'].agg(['mean','median']).round(2)
In [46]:
program_country.head(10)
Out[46]:
| mean | median | |
|---|---|---|
| Country | ||
| Afghanistan | 22328.67 | 1000.0 |
| Albania | 47217.60 | 50000.0 |
| Algeria | 20187.29 | 7088.0 |
| Andorra | 226103.50 | 226103.5 |
| Antigua and Barbuda | 1.00 | 1.0 |
| Argentina | 47080.21 | 40000.0 |
| Armenia | 19093.40 | 2075.0 |
| Australia | 118091.41 | 97514.0 |
| Austria | 78558.39 | 75410.0 |
| Azerbaijan | 23445.33 | 29397.0 |
In [47]:
#Завдання 8. Аналіз освіти найбільш оплачуваних спеціалістів
In [48]:
sr_public[['ResponseId','EdLevel','ConvertedCompYearly']]
Out[48]:
| ResponseId | EdLevel | ConvertedCompYearly | |
|---|---|---|---|
| 0 | 1 | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | 61256.0 |
| 1 | 2 | Associate degree (A.A., A.S., etc.) | 104413.0 |
| 2 | 3 | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | 53061.0 |
| 3 | 4 | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | 36197.0 |
| 4 | 5 | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | 60000.0 |
| ... | ... | ... | ... |
| 49186 | 49187 | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | NaN |
| 49187 | 49188 | Some college/university study without earning ... | NaN |
| 49188 | 49189 | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | NaN |
| 49189 | 49190 | Professional degree (JD, MD, Ph.D, Ed.D, etc.) | NaN |
| 49190 | 49191 | Some college/university study without earning ... | NaN |
49191 rows × 3 columns
In [49]:
sr_public[['ResponseId','EdLevel','ConvertedCompYearly']].isna().sum()
Out[49]:
ResponseId 0 EdLevel 1042 ConvertedCompYearly 25244 dtype: int64
In [50]:
education = sr_public[['ResponseId','EdLevel','ConvertedCompYearly']].dropna(subset=['EdLevel','ConvertedCompYearly'])
education.isna().sum()
Out[50]:
ResponseId 0 EdLevel 0 ConvertedCompYearly 0 dtype: int64
In [51]:
education_top5 = education.sort_values(by = 'ConvertedCompYearly', ascending = False).head(5)
In [52]:
education_top5['EdLevel'].reset_index()
Out[52]:
| index | EdLevel | |
|---|---|---|
| 0 | 34267 | Associate degree (A.A., A.S., etc.) |
| 1 | 28700 | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) |
| 2 | 43143 | Associate degree (A.A., A.S., etc.) |
| 3 | 35353 | Bachelor’s degree (B.A., B.S., B.Eng., etc.) |
| 4 | 45971 | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) |
In [53]:
#Завдання 9. Аналіз популярності Python по віковим категоріям
In [54]:
work_python1 = sr_public[sr_public['worked_with_python'] == True]
work_python1.head()
Out[54]:
| ResponseId | MainBranch | Age | EdLevel | Employment | EmploymentAddl | WorkExp | LearnCodeChoose | LearnCode | LearnCodeAI | ... | AIAgentObserveSecure | AIAgentObsWrite | AIAgentExternal | AIAgentExtWrite | AIHuman | AIOpen | ConvertedCompYearly | JobSat | worked_with_python | learned_with_online_courses | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 5 | I am a developer by profession | 35-44 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Independent contractor, freelancer, or self-em... | Caring for dependents (children, elderly, etc.) | 21.0 | No, I am not new to coding and did not learn n... | NaN | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I don’t trust AI’s answers | critical thinking, the skill to define the tas... | 60000.0 | 7.0 | True | False |
| 7 | 8 | I am a developer by profession | 35-44 years old | Professional degree (JD, MD, Ph.D, Ed.D, etc.) | Employed | Engaged in paid work (20-29 hours per week);Tr... | 22.0 | Yes, I am not new to coding but am learning ne... | Books / Physical media;Technical documentation... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I want to learn best practices;When I wan... | Innovation, system design | 72000.0 | 6.0 | True | False |
| 8 | 9 | I am a developer by profession | 25-34 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Employed | Caring for dependents (children, elderly, etc.... | 9.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | NaN | NaN | 70000.0 | 8.0 | True | True |
| 15 | 16 | I am a developer by profession | 18-24 years old | Bachelor’s degree (B.A., B.S., B.Eng., etc.) | Student | Engaged in paid work (20-29 hours per week);En... | 5.0 | Yes, I am new to coding or currently a student | Online Courses or Certification (includes all ... | No, I learned something that was not related t... | ... | Galileo;Honeycomb;Metero;New Relic;opik;Snyk | NaN | ChatGPT;AgentGPT;Auto-GPT;Devin AI;Glean (Ente... | NaN | When I don’t trust AI’s answers;When I have et... | 5 | NaN | 7.0 | True | True |
| 17 | 18 | I am a developer by profession | 25-34 years old | Master’s degree (M.A., M.S., M.Eng., MBA, etc.) | Employed | NaN | 1.0 | Yes, I am not new to coding but am learning ne... | Online Courses or Certification (includes all ... | Yes, I learned how to use AI-enabled tools for... | ... | NaN | NaN | NaN | NaN | When I want to learn best practices;When I hav... | NaN | NaN | 6.0 | True | True |
5 rows × 174 columns
In [55]:
python_users = work_python1['Age'].value_counts()
python_users
Out[55]:
Age 25-34 years old 6102 35-44 years old 4862 18-24 years old 3684 45-54 years old 2424 55-64 years old 978 65 years or older 298 Prefer not to say 118 Name: count, dtype: int64
In [56]:
users_all = sr_public['Age'].value_counts()
users_all
Out[56]:
Age 25-34 years old 16519 35-44 years old 13241 18-24 years old 9210 45-54 years old 6275 55-64 years old 2626 65 years or older 942 Prefer not to say 378 Name: count, dtype: int64
In [57]:
python_users_percentage = ((python_users/users_all)*100).reset_index().round(2)
python_users_percentage
#Найбільшу частку має вікова група 18 - 24 40% людей,які програмують на Python
Out[57]:
| Age | count | |
|---|---|---|
| 0 | 25-34 years old | 36.94 |
| 1 | 35-44 years old | 36.72 |
| 2 | 18-24 years old | 40.00 |
| 3 | 45-54 years old | 38.63 |
| 4 | 55-64 years old | 37.24 |
| 5 | 65 years or older | 31.63 |
| 6 | Prefer not to say | 31.22 |
In [ ]:
#Завдання 10. Аналіз індустрій серед високооплачуваних віддалених працівників
In [59]:
sr_public['ConvertedCompYearly'].isna().sum()
Out[59]:
np.int64(25244)
In [60]:
clean = sr_public['ConvertedCompYearly'].dropna()
In [61]:
clean.isna().sum()
Out[61]:
np.int64(0)
In [63]:
quan = clean.quantile(0.75)
quan
Out[63]:
np.float64(120596.0)
In [64]:
sr_public1 = sr_public[(sr_public['ConvertedCompYearly'] > quan) & (sr_public['RemoteWork'] == 'Remote')]
In [65]:
sr_public1.shape
Out[65]:
(2461, 174)
In [66]:
sr_public1['RemoteWork'].value_counts()
Out[66]:
RemoteWork Remote 2461 Name: count, dtype: int64
In [69]:
sr_public1 = sr_public1.dropna(subset=['Industry'])
In [71]:
sr_public1['Industry'].isna().sum()
Out[71]:
np.int64(0)
In [73]:
industry = sr_public1['Industry'].value_counts().reset_index()
industry
Out[73]:
| Industry | count | |
|---|---|---|
| 0 | Software Development | 1186 |
| 1 | Fintech | 190 |
| 2 | Healthcare | 188 |
| 3 | Other: | 176 |
| 4 | Internet, Telecomm or Information Services | 138 |
| 5 | Banking/Financial Services | 88 |
| 6 | Government | 78 |
| 7 | Media & Advertising Services | 75 |
| 8 | Retail and Consumer Services | 65 |
| 9 | Transportation, or Supply Chain | 63 |
| 10 | Computer Systems Design and Services | 59 |
| 11 | Insurance | 46 |
| 12 | Energy | 45 |
| 13 | Manufacturing | 33 |
| 14 | Higher Education | 30 |
In [ ]: