Primary education, pupils (% female)

Source: worldbank.org, 03.09.2025

Year: 2018

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 39 -0.791% 93
Albania Albania 47.4 +0.552% 82
Andorra Andorra 47.8 -0.471% 71
Armenia Armenia 46.7 -0.0567% 84
Antigua & Barbuda Antigua & Barbuda 49.2 +0.388% 26
Azerbaijan Azerbaijan 46.3 -0.724% 89
Burundi Burundi 50.1 -0.16% 9
Benin Benin 47.7 +0.121% 78
Burkina Faso Burkina Faso 48.7 -0.0636% 41
Bangladesh Bangladesh 50.7 +0.134% 4
Bahrain Bahrain 49.4 -0.0597% 19
Bahamas Bahamas 49.6 -1.21% 17
Bosnia & Herzegovina Bosnia & Herzegovina 48.5 +0.124% 46
Belarus Belarus 48.5 +0.139% 48
Belize Belize 47.7 -0.13% 76
Bolivia Bolivia 48.7 +0.15% 42
Barbados Barbados 48.3 +0.0632% 51
Brunei Brunei 48.6 +0.344% 44
Bhutan Bhutan 49.3 +0.116% 22
China China 46.5 +0.125% 88
Côte d’Ivoire Côte d’Ivoire 47.9 +0.778% 69
Cameroon Cameroon 47 +0.0342% 83
Colombia Colombia 48.1 +0.0683% 62
Comoros Comoros 49.1 +2.18% 28
Cape Verde Cape Verde 47.8 -0.0938% 73
Costa Rica Costa Rica 49.1 -0.122% 29
Cuba Cuba 47.5 +0.423% 81
Cayman Islands Cayman Islands 48.4 -2.64% 50
Djibouti Djibouti 46.1 -0.799% 90
Dominican Republic Dominican Republic 47.6 +0.479% 80
Algeria Algeria 47.8 +0.215% 72
Ecuador Ecuador 49.3 +0.218% 21
Egypt Egypt 48.6 +0.0578% 43
Eritrea Eritrea 45.1 -0.164% 91
Georgia Georgia 47.7 +0.294% 77
Ghana Ghana 49.3 +0.0942% 23
Gambia Gambia 51.8 +0.487% 2
Grenada Grenada 48.2 +1.72% 57
Guatemala Guatemala 48.3 +0.22% 55
Hong Kong SAR China Hong Kong SAR China 47.8 -0.119% 74
Indonesia Indonesia 47.8 -0.00992% 75
Jamaica Jamaica 48.1 -1.46% 66
Jordan Jordan 48.9 -0.0592% 34
Kazakhstan Kazakhstan 49 -0.00805% 31
Kyrgyzstan Kyrgyzstan 48.8 +0.0175% 39
Cambodia Cambodia 48.1 -0.179% 60
Kuwait Kuwait 49 +1.81% 30
Laos Laos 48.1 -0.057% 64
Lebanon Lebanon 48.2 -0.0746% 58
St. Lucia St. Lucia 49.6 +1.03% 16
Sri Lanka Sri Lanka 49.2 +0.004% 24
Macao SAR China Macao SAR China 48.2 +0.366% 59
Morocco Morocco 47.6 +0.254% 79
Monaco Monaco 49.9 +0.746% 12
Moldova Moldova 48.3 +0.13% 53
Madagascar Madagascar 49.8 +0.146% 13
Mali Mali 46.6 +0.357% 85
Myanmar (Burma) Myanmar (Burma) 48.6 +0.484% 45
Montenegro Montenegro 46.5 -2.32% 87
Mongolia Mongolia 48.8 -0.0827% 38
Mozambique Mozambique 48.1 +0.0939% 65
Mauritania Mauritania 50.7 -0.394% 5
Mauritius Mauritius 49.7 +0.47% 14
Malawi Malawi 49.9 -1.16% 11
Namibia Namibia 49.2 +0.18% 25
Oman Oman 50.2 +0.743% 7
Pakistan Pakistan 44 -1.19% 92
Peru Peru 49.1 +0.0826% 27
North Korea North Korea 48.9 -0.27% 35
Palestinian Territories Palestinian Territories 49 +0.214% 32
Qatar Qatar 48.9 -0.00342% 37
Rwanda Rwanda 49.7 -0.39% 15
Saudi Arabia Saudi Arabia 49.5 -0.215% 18
Senegal Senegal 52.5 -1.03% 1
Solomon Islands Solomon Islands 48.3 +0.18% 54
Sierra Leone Sierra Leone 50.9 +0.73% 3
El Salvador El Salvador 48.1 +0.0627% 63
San Marino San Marino 50.5 +10.8% 6
Serbia Serbia 48.4 -0.0572% 49
Suriname Suriname 48.1 -0.296% 61
Seychelles Seychelles 50.1 +0.203% 8
Turks & Caicos Islands Turks & Caicos Islands 48.8 +0.559% 40
Togo Togo 49 +0.546% 33
Thailand Thailand 48.5 -0.00975% 47
Timor-Leste Timor-Leste 48.3 -0.0555% 56
Tunisia Tunisia 48 -0.13% 67
Tuvalu Tuvalu 46.5 -0.965% 86
Tanzania Tanzania 50.1 -0.452% 10
Ukraine Ukraine 48.9 -0.042% 36
Uzbekistan Uzbekistan 48.3 -0.0514% 52
St. Vincent & Grenadines St. Vincent & Grenadines 49.3 +0.644% 20
Vietnam Vietnam 47.8 -0.0213% 70
Samoa Samoa 48 -0.183% 68

The indicator 'Primary education, pupils (% female)' reflects the percentage of female students enrolled in primary education relative to the total number of students. This metric is crucial as it not only captures gender equality in education but also provides insights into the broader socio-economic status of a region. Gender parity in education is essential for the empowerment of women and the overall development of society.

The significance of achieving gender parity in primary education extends far beyond the classroom. Education is often seen as a great equalizer; when girls receive an education, they are more likely to participate in the workforce, contribute to economic growth, and make informed decisions about their health and family life. Moreover, studies have indicated that educated women tend to have healthier families, leading to a multi-generational improvement in community wellbeing.

In examining the data from 2019, the median value for female enrollment in primary education stood at 49.31%. This figure reflects a near balance between boys and girls in primary education, although it minimally favors male students in some regions. For instance, the highest rates were located in Nepal, where 50.61% of primary students are female, followed closely by Monaco (49.57%) and Ghana (49.31%). Conversely, Djibouti reported the lowest percentage at 46.36%. These figures point to varying degrees of emphasis on gender in education across different geographical areas, emphasizing that cultural, economic, and political factors play a major role in shaping educational policies.

Several factors affect the percentage of female pupils in primary education. Cultural attitudes toward gender roles greatly influence educational access. In some regions, traditional beliefs may undervalue the importance of girls’ education, leading to lesser investment in female schooling. Economic factors also play a critical role; in low-income families, parents may prioritize boys' education when resources are scarce, perpetuating a cycle of gender inequality.

Government policy and international aid are pivotal in shaping educational landscapes. Committed governments that prioritize equitable education often implement policies that promote female enrollment, such as scholarship programs, provision of school amenities, and community awareness campaigns. Additionally, global initiatives like the United Nations’ Sustainable Development Goals (SDGs) focus on achieving gender equality and quality education for all, creating a framework and advocacy for improving female enrollment ratios.

Despite advancements, several flaws exist in educational strategies aimed at improving the percentage of female pupils. One primary concern is the inconsistency in data collection and reporting, which can misrepresent the actual status of girls’ education. In some cases, data may only reflect enrollment numbers but fail to account for retention rates or educational quality, which are equally important in understanding the impact of education on girls. Furthermore, political stability plays a significant role; in regions afflicted by conflict or natural disasters, schools may close, disproportionately affecting girls due to safety concerns and social pressures.

To enhance the percentage of female pupils in primary education, specific strategies can be employed. Among these is the need for targeted outreach programs that engage communities in recognizing the value of girls' education. Additionally, training and incentivizing female teachers can create a more welcoming classroom environment for girls. Schools can also implement flexible schedules to accommodate families that require children to contribute economically at home, thereby reducing barriers to education.

As we look to the data trends over the decades since 1970, we observe a gradual increase in the global percentage of female enrollment in primary education, from 43.44% in 1970 to 49.31% in 2019. This upward trajectory is promising but indicates that there is still a significant distance to cover to achieve full gender parity. The narrow margins in the top and bottom rankings illustrate that even in regions where the percentage is somewhat balanced, females still face systemic barriers that need addressing.

Viewing the top five areas for female enrollment—which include diverse locations from Nepal to Monaco—highlights that progress can be achieved across varying socio-economic frameworks. However, it is equally important to pay attention to the bottom areas where interventions are needed most. Conversely, the world values illustrate that overall education systems have made strides but still require vigilant monitoring and necessary interventions to ensure that all girls have equal opportunities in obtaining an education.

In conclusion, the percentage of female pupils in primary education serves as a critical indicator of not just gender parity, but of a region's commitment to equity and development. By addressing cultural norms, economic barriers, and committing to targeted education policies, societies can create an environment where girls flourish academically, contributing to broader economic and social prosperity in the long run.

                    
# 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.PRM.ENRL.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.PRM.ENRL.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))