Data Analysis Using Python
Libraries
1. Pandas
Pandas is an open-source Python library for data manipulation and
analysis. It provides data structures like DataFrame and Series for
efficiently handling structured data.
Key Functions:
1. read_csv()
• Used to read data from CSV files.
• Example:
df = pd.read_csv([Link]')
2. head() and tail()
• Display the first or last few rows of a DataFrame.
• Example:
3. groupby()
• Groups data based on a column or set of columns.
• Example:
4. isnull() and dropna()
• Check for null values and remove them.
• Example:
5. merge()
• Combine two datasets based on a common column.
• Example:
[Link](df1, df2, on='ID')
Case Study 1: Analyzing Student
Performance
Tasks:
1. Calculate the average score for each student.
2. Find the student with the highest total score.
3. Identify students who need improvement (average score below
80).
Python Code Implementation
Expected Output:
1. Average Score for each student:
• Alice: 85.33
• Bob: 77.33
• Charlie: 91.66
• David: 70.33
• Eva: 87.66
2. Student with the highest total score:
• Charlie (Total Score: 275)
3. Students who need improvement:
• Bob
• David