0
0
Data Analysis Pythondata~30 mins

Essential libraries overview (Pandas, NumPy, Matplotlib) in Data Analysis Python - Mini Project: Build & Apply

Choose your learning style9 modes available
Essential libraries overview (Pandas, NumPy, Matplotlib)
📖 Scenario: You are starting a new data science project. You want to get familiar with three important Python libraries: Pandas, NumPy, and Matplotlib. These libraries help you work with data, do math, and make charts.
🎯 Goal: You will create a small dataset, set a threshold value, filter data using NumPy, and then plot the filtered data using Matplotlib.
📋 What You'll Learn
Create a Pandas DataFrame with specific data
Create a threshold variable
Use NumPy to filter data based on the threshold
Use Matplotlib to plot the filtered data
Print the filtered data
💡 Why This Matters
🌍 Real World
Data scientists often use Pandas to organize data, NumPy to perform fast calculations, and Matplotlib to visualize results. This combination helps in understanding and communicating data insights clearly.
💼 Career
Knowing these libraries is essential for data analyst and data scientist roles, as they form the foundation for data manipulation, analysis, and visualization in Python.
Progress0 / 4 steps
1
Create a Pandas DataFrame
Create a Pandas DataFrame called df with two columns: 'Name' and 'Score'. Use these exact entries: 'Alice' with score 85, 'Bob' with score 92, 'Charlie' with score 78, 'Diana' with score 90, and 'Evan' with score 72.
Data Analysis Python
Need a hint?

Use pd.DataFrame with a dictionary where keys are column names and values are lists of data.

2
Set a threshold value
Create a variable called threshold and set it to the integer 80.
Data Analysis Python
Need a hint?

Just create a variable named threshold and assign the number 80 to it.

3
Filter scores using NumPy
Import NumPy as np. Use NumPy to create a variable called filtered_scores that contains only the scores from df['Score'] that are greater than the threshold.
Data Analysis Python
Need a hint?

Use NumPy arrays and boolean indexing to select scores above the threshold.

4
Plot filtered scores and print them
Import Matplotlib's pyplot as plt. Use plt.bar to create a bar chart of filtered_scores with labels as the corresponding names from df['Name'] who have scores above the threshold. Then print the filtered_scores array.
Data Analysis Python
Need a hint?

Use plt.bar with names and scores filtered by the threshold. Then use print(filtered_scores).