What is a Data Analyst, What Do They Do, and How to Become One?
…
Core Daily Tasks of a Data Analyst
…
- …
- …
- …
- …
- …
…
How to Become a Data Analyst? (Roadmap)
…
- …
- …
- …
- …
- …
…
How Are These Tasks Done in Python and SQL? (Examples)
…
1. Filtering Customer Data with SQL (Example)
…
SELECT customer_id, age, city, monthly_spending
FROM customers
WHERE age > 30
AND city = 'Istanbul'
AND subscription_status = 'Active'
ORDER BY monthly_spending DESC
LIMIT 10;
2. Missing Data Cleaning and Analysis with Python (Pandas)
…
import pandas as pd
import matplotlib.pyplot as plt
# 1. Read the Data
df = pd.read_csv('sales_data.csv')
# 2. Fill missing (Null) values with the mean of existing ones
mean_revenue = df['Revenue'].mean()
df['Revenue'].fillna(mean_revenue, inplace=True)
# 3. Find total revenue by category (Group By)
category_summary = df.groupby('Category')['Revenue'].sum().reset_index()
print(category_summary)
# 4. Simply Draw a Bar Chart
category_summary.plot(kind='bar', x='Category', y='Revenue', color='#3b82f6')
plt.title('Total Revenue by Category')
plt.show()
3. Advanced Data Cleaning (Real Python Example)
…
import pandas as pd
# 1. Standardizing city names (e.g. " ANKARA " -> "Ankara")
df["sehir"] = (df["sehir"]
.fillna("Unknown")
.str.strip()
.str.title())
# 2. Filling missing numerical values with Median (resistant to outliers)
median_income = df["yillik_gelir"].median()
df["yillik_gelir"] = df["yillik_gelir"].fillna(median_income)
How AIBender Does It in JavaScript
…
// 1. Standardizing string columns across the dataset array
data = data.map(row => {
let city = row["sehir"];
row["sehir"] = city ? city.trim().charAt(0).toUpperCase() + city.slice(1).toLowerCase() : "Unknown";
return row;
});
// 2. Calculating median and filling missing numerical values
const incomes = data.map(r => r["yillik_gelir"]).filter(v => typeof v === 'number').sort((a,b) => a - b);
const mid = Math.floor(incomes.length / 2);
const medianIncome = incomes.length % 2 !== 0 ? incomes[mid] : (incomes[mid - 1] + incomes[mid]) / 2;
data.forEach(row => {
if (row["yillik_gelir"] === null || row["yillik_gelir"] === undefined) {
row["yillik_gelir"] = medianIncome;
}
});
4. Similar Logic with Excel
…
How Can You Practice Using AIBender?
…
- …
- …
- …
- …
- …
…