π Project 72 β College Major Salary Analysis (Pandas)
README GENERATED BY AI
π Overview
Project 72 is a data analysis script built with Python and pandas that explores salary trends across different undergraduate majors. Using a CSV dataset, the program identifies:
- Majors with the highest and lowest starting salaries
- Majors with the highest mid-career salaries
- Low-risk majors (small salary spread over time)
- High-potential majors (large salary growth over time)
This project focuses on practical data cleaning, analysis, and ranking techniques using pandas.
π οΈ Technologies Used
- Python 3
- pandas
π Dataset Requirements
The script expects a file named data.csv in the same directory.
Required columns:
Undergraduate MajorStarting Median SalaryMid-Career Median SalaryMid-Career 90th Percentile Salary
Any rows containing missing values are automatically removed before analysis.
π What the Script Does
1. Data Cleaning
- Loads the CSV file
- Removes rows with missing data (
dropna())
2. Salary Insights
- Finds the highest starting median salary
- Finds the highest mid-career median salary
- Finds the lowest starting median salary
3. Risk vs Reward Analysis
- Calculates a Spread value:
Spread = Mid-Career 90th Percentile Salary β Starting Median Salary
* Uses this spread to determine:
- Top 5 Lowest Risk Majors (smallest spread)
- Top 5 Highest Potential Majors (largest spread)
βΆοΈ How to Run
- Install pandas if you donβt have it:
bash
pip install pandas
2. Make sure data.csv is in the same folder as the script.
3. Run the script:
bash
python main.py
π€ Output
The program prints a clear, readable summary directly to the console, showing:
- Major names
- Salary values
- Salary change potential
π― Learning Goals
- CSV data handling with pandas
- Data cleaning (
dropna) - Index-based analysis (
idxmax,idxmin) - Sorting and ranking datasets
- Real-world data insights using Python
π Future Improvements
- Visualizations using matplotlib or seaborn
- Export results to a CSV or JSON file
- Interactive CLI options
- Salary normalization for inflation
π License
This project is open-source and intended for educational use.