Secondary education, general pupils (% female)

Source: worldbank.org, 03.09.2025

Year: 2018

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 35.3 +0.181% 89
Albania Albania 49.7 +0.132% 48
Andorra Andorra 49.4 -0.703% 54
Armenia Armenia 47.8 -0.339% 74
Antigua & Barbuda Antigua & Barbuda 49 +0.175% 62
Azerbaijan Azerbaijan 46.1 -0.481% 81
Burundi Burundi 53.3 +3.08% 3
Burkina Faso Burkina Faso 49.3 +1.54% 56
Bangladesh Bangladesh 53.9 +0.0566% 2
Bahrain Bahrain 51.7 -0.275% 17
Bahamas Bahamas 51.7 +1.96% 16
Bosnia & Herzegovina Bosnia & Herzegovina 51.5 +0.35% 19
Belarus Belarus 49.9 -0.169% 40
Belize Belize 50.9 -0.936% 26
Bolivia Bolivia 47.5 +0.0432% 78
Barbados Barbados 49.6 -0.0473% 51
Brunei Brunei 49.2 -0.209% 58
Bhutan Bhutan 52.4 +0.701% 9
China China 47.9 +0.181% 72
Côte d’Ivoire Côte d’Ivoire 43.2 +2.1% 86
Colombia Colombia 50 -0.198% 39
Comoros Comoros 50.8 -0.329% 27
Cape Verde Cape Verde 52.5 +0.379% 8
Costa Rica Costa Rica 50.2 -0.25% 36
Cuba Cuba 52 -0.0751% 11
Cayman Islands Cayman Islands 49.7 -0.604% 49
Djibouti Djibouti 45.3 +0.383% 82
Dominican Republic Dominican Republic 50.3 -0.944% 32
Algeria Algeria 50.7 -0.155% 28
Ecuador Ecuador 50.6 +0.051% 31
Egypt Egypt 50.3 +0.225% 35
Eritrea Eritrea 46.7 +0.55% 79
Georgia Georgia 47.5 +0.219% 77
Ghana Ghana 49.2 +0.752% 59
Gambia Gambia 53.2 +1.29% 4
Grenada Grenada 49.8 -0.606% 42
Guatemala Guatemala 46.6 +0.118% 80
Hong Kong SAR China Hong Kong SAR China 48.3 +0.0897% 71
Indonesia Indonesia 50.7 +0.00564% 29
Jamaica Jamaica 49.7 -0.976% 46
Jordan Jordan 50.7 +0.0675% 30
Kazakhstan Kazakhstan 49.7 -0.0482% 47
Kyrgyzstan Kyrgyzstan 49.7 +0.123% 45
Cambodia Cambodia 51.8 +0.501% 15
Kuwait Kuwait 48.6 -0.663% 69
Laos Laos 47.6 +0.361% 76
Lebanon Lebanon 53.1 -0.018% 6
St. Lucia St. Lucia 50.1 -0.467% 37
Sri Lanka Sri Lanka 51.4 +0.0214% 20
Macao SAR China Macao SAR China 48.8 -0.0712% 66
Morocco Morocco 47.7 +1.41% 75
Monaco Monaco 50.1 -0.195% 38
Moldova Moldova 49.8 -0.117% 41
Madagascar Madagascar 51 +0.85% 23
Mali Mali 45 +0.73% 83
Myanmar (Burma) Myanmar (Burma) 52 -0.23% 13
Montenegro Montenegro 49.8 -0.167% 43
Mozambique Mozambique 48.8 -0.461% 65
Mauritania Mauritania 49.8 +0.448% 44
Mauritius Mauritius 52 -0.492% 12
Malawi Malawi 49.5 +2.3% 52
Malaysia Malaysia 51.3 +0.688% 21
Niger Niger 42.5 +2.86% 88
Oman Oman 48.7 -0.169% 67
Pakistan Pakistan 44.4 +2.98% 84
Peru Peru 48.7 +0.0336% 68
Palestinian Territories Palestinian Territories 51.7 +0.393% 18
Qatar Qatar 49.2 -0.23% 60
Rwanda Rwanda 54.1 -0.236% 1
Saudi Arabia Saudi Arabia 47.9 +2.41% 73
Senegal Senegal 52 +0.73% 14
Solomon Islands Solomon Islands 49.1 -0.382% 61
Sierra Leone Sierra Leone 48.9 +1.85% 64
El Salvador El Salvador 49.3 +0.306% 55
San Marino San Marino 44.1 -17.1% 85
Serbia Serbia 50.3 +0.274% 33
Seychelles Seychelles 51 -3.91% 22
Turks & Caicos Islands Turks & Caicos Islands 49.7 -3.7% 50
Togo Togo 42.7 +1.6% 87
Thailand Thailand 49.2 +0.968% 57
Timor-Leste Timor-Leste 52.3 +0.618% 10
Tunisia Tunisia 53.1 +0.548% 5
Tuvalu Tuvalu 52.6 +0.165% 7
Tanzania Tanzania 51 +1.28% 24
Ukraine Ukraine 49.5 +0.0848% 53
Uzbekistan Uzbekistan 48.3 -0.0217% 70
St. Vincent & Grenadines St. Vincent & Grenadines 48.9 +1.31% 63
Vietnam Vietnam 50.3 -0.222% 34
Samoa Samoa 50.9 +0.0914% 25

The indicator of secondary education, reflecting the percentage of female pupils enrolled, offers insightful data pertaining to gender parity in education. As of 2019, the global median value stands at approximately 49.69%, indicating a near-equal representation of girls and boys in secondary education across the world. This statistic is significant not only as a measure of educational access but also as an indicator of societal values and the progress toward gender equality.

The importance of monitoring the percentage of female pupils in secondary education cannot be overstated. Education is a fundamental right and a critical component of human development. Gender equity in education has been shown to yield a myriad of benefits, including economic growth, improved health outcomes, and reduced poverty. Beyond individual advantages, a more educated female population contributes to robust societal frameworks, fostering development and stability. Countries achieving gender parity in secondary education often witness improved economic performance, as women equipped with education are more likely to participate in the workforce and hold decision-making positions.

This indicator also correlates with various other metrics related to development. For instance, higher percentages of female students typically align with improved health indicators, such as maternal health and child nutrition. Moreover, nations with greater gender parity in education tend to have lower rates of child marriage and higher levels of political participation among women. Thus, the percentage of female pupils in secondary education serves as a vital link between education and broader social outcomes.

Several factors may influence the percentage of girls in secondary education, including cultural attitudes towards gender roles, economic conditions, and governmental policies on education. In many regions, traditional attitudes may prioritize boys' education over girls', leading to disparities in enrollment rates. Additionally, economic constraints can impact families’ decisions regarding which children to send to school, often sidelining girls in favor of boys due to perceived future returns on investment. On a systemic level, the availability of supportive policies and programs, such as scholarships for girls, gender-sensitive curricula, and safe transportation to school, are crucial in enhancing female enrollment in secondary education.

For countries striving to improve the enrollment of female pupils, there are several strategies that can be employed. Initiatives that target educational infrastructure—such as building more schools and providing financial aid for families—can significantly increase girls' attendance. The implementation of awareness campaigns aimed at changing societal attitudes towards women's education can also be beneficial. These campaigns can leverage local leaders and role models to reshape community perceptions and encourage families to invest in daughters' futures through education.

Challenges remain, however. Even with nominal female enrollment figures, issues such as quality of education, dropout rates, and retention remain critical. The existence of gender biases in curricula, teaching methodologies, and classroom environments can hinder the overall educational experience for girls. Moreover, violence and harassment in and on the way to school remain profound barriers to girls’ education, leading to higher dropout rates and contributing to a cycle of educational inequity.

When analyzing the latest data, the highest enrollment percentages occur in countries such as Nepal (51.43%), Monaco (50.8%), and Kazakhstan (49.69%). These figures indicate a positive trend towards gender parity, but it is essential to contextualize them within the regions’ broader educational systems and social policies. For instance, while Nepal shows a higher percentage of female representation, persistent challenges such as geographical barriers and cultural practices may still affect educational equality at other levels and over longer periods.

Conversely, while the lowest representation noted includes Djibouti at 46.31% and Ghana at 49.5%, a closer examination is necessary to understand underlying causes such as conflict situations, economic hardships, and social norms that may inhibit girls' access to education. For example, in Djibouti, proximity to ongoing conflict and weak infrastructure can severely limit educational opportunities for girls, resulting in lower enrollment percentages.

The historical data spanning from 1970 to 2018 indicates a gradual increase in the global percentage of female secondary school pupils, which has risen from 41.98% to 48.61%. This upward trend reflects significant strides toward gender equality in education over nearly five decades. Although the median value is still short of a true balance, the progression demonstrates that concerted efforts over the years are beginning to show results. The incremental increases suggest that while barriers persist, there is the potential for continued improvement if strategic efforts are maintained.

In conclusion, the indicator of female pupils in secondary education is more than just a percentage; it is a vital barometer of societal advancement and a pathway to broader gender equality. By understanding the factors affecting this statistic and implementing targeted strategies, countries can move closer to achieving gender parity in education, unlocking the potential of millions of girls in the process. It is imperative that global communities continue to prioritize girls’ education, recognizing its profound impact on individual lives and society as a whole.

                    
# Install missing packages
import sys
import subprocess

def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# Required packages
for package in ['wbdata', 'country_converter']:
try:
__import__(package)
except ImportError:
install(package)

# Import libraries
import wbdata
import country_converter as coco
from datetime import datetime

# Define World Bank indicator code
dataset_code = 'SE.SEC.ENRL.GC.FE.ZS'

# Download data from World Bank API
data = wbdata.get_dataframe({dataset_code: 'value'},
date=(datetime(1960, 1, 1), datetime.today()),
parse_dates=True,
keep_levels=True).reset_index()

# Extract year
data['year'] = data['date'].dt.year

# Convert country names to ISO codes using country_converter
cc = coco.CountryConverter()
data['iso2c'] = cc.convert(names=data['country'], to='ISO2', not_found=None)
data['iso3c'] = cc.convert(names=data['country'], to='ISO3', not_found=None)

# Filter out rows where ISO codes could not be matched — likely not real countries
data = data[data['iso2c'].notna() & data['iso3c'].notna()]

# Sort for calculation
data = data.sort_values(['iso3c', 'year'])

# Calculate YoY absolute and percent change
data['value_change'] = data.groupby('iso3c')['value'].diff()
data['value_change_percent'] = data.groupby('iso3c')['value'].pct_change() * 100

# Calculate ranks (higher GDP per capita = better rank)
data['rank'] = data.groupby('year')['value'].rank(ascending=False, method='dense')

# Calculate rank change from previous year
data['rank_change'] = data.groupby('iso3c')['rank'].diff()

# Select desired columns
final_df = data[['country', 'iso2c', 'iso3c', 'year', 'value',
'value_change', 'value_change_percent', 'rank', 'rank_change']].copy()

# Optional: Add labels as metadata (could be useful for export or UI)
column_labels = {
'country': 'Country name',
'iso2c': 'ISO 2-letter country code',
'iso3c': 'ISO 3-letter country code',
'year': 'Year',
'value': 'GDP per capita (current US$)',
'value_change': 'Year-over-Year change in value',
'value_change_percent': 'Year-over-Year percent change in value',
'rank': 'Country rank by GDP per capita (higher = richer)',
'rank_change': 'Change in rank from previous year'
}

# Display first few rows
print(final_df.head(10))

# Optional: Save to CSV
#final_df.to_csv("gdp_per_capita_cleaned.csv", index=False)
                    
                
                    
# Check and install required packages
required_packages <- c("WDI", "countrycode", "dplyr")

for (pkg in required_packages) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    install.packages(pkg)
  }
}

# Load the necessary libraries
library(WDI)
library(dplyr)
library(countrycode)

# Define the dataset code (World Bank indicator code)
dataset_code <- 'SE.SEC.ENRL.GC.FE.ZS'

# Download data using WDI package
dat <- WDI(indicator = dataset_code)

# Filter only countries using 'is_country' from countrycode
# This uses iso2c to identify whether the entry is a recognized country
dat <- dat %>%
  filter(countrycode(iso2c, origin = 'iso2c', destination = 'country.name', warn = FALSE) %in%
           countrycode::codelist$country.name.en)

# Ensure dataset is ordered by country and year
dat <- dat %>%
  arrange(iso3c, year)

# Rename the dataset_code column to "value" for easier manipulation
dat <- dat %>%
  rename(value = !!dataset_code)

# Calculate year-over-year (YoY) change and percentage change
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(
    value_change = value - lag(value),                              # Absolute change from previous year
    value_change_percent = 100 * (value - lag(value)) / lag(value) # Percent change from previous year
  ) %>%
  ungroup()

# Calculate rank by year (higher value => higher rank)
dat <- dat %>%
  group_by(year) %>%
  mutate(rank = dense_rank(desc(value))) %>% # Rank countries by descending value
  ungroup()

# Calculate rank change (positive = moved up, negative = moved down)
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(rank_change = rank - lag(rank)) %>% # Change in rank compared to previous year
  ungroup()

# Select and reorder final columns
final_data <- dat %>%
  select(
    country,
    iso2c,
    iso3c,
    year,
    value,
    value_change,
    value_change_percent,
    rank,
    rank_change
  )

# Add labels (variable descriptions)
attr(final_data$country, "label") <- "Country name"
attr(final_data$iso2c, "label") <- "ISO 2-letter country code"
attr(final_data$iso3c, "label") <- "ISO 3-letter country code"
attr(final_data$year, "label") <- "Year"
attr(final_data$value, "label") <- "GDP per capita (current US$)"
attr(final_data$value_change, "label") <- "Year-over-Year change in value"
attr(final_data$value_change_percent, "label") <- "Year-over-Year percent change in value"
attr(final_data$rank, "label") <- "Country rank by GDP per capita (higher = richer)"
attr(final_data$rank_change, "label") <- "Change in rank from previous year"

# Print the first few rows of the final dataset
print(head(final_data, 10))