Advanced Python Architecture & Async
20 mins read
Free Lesson
Manipulate multi-dimensional arrays with NumPy and clean structured tabular data with Pandas DataFrames.
Data Analysis with Pandas
import pandas as pd
import numpy as np
data = {
'track': ['Java', 'Python', 'React', 'Vue', 'Next.js'],
'enrolled_students': [12000, 18500, 15300, 9400, 14200],
'avg_rating': [4.8, 4.9, 4.7, 4.8, 4.9]
}
df = pd.DataFrame(data)
# Filter courses with > 10,000 students and calculate statistics
top_tracks = df[df['enrolled_students'] > 10000]
print("Average Rating of Top Tracks:", top_tracks['avg_rating'].mean())