data-science-python
Python data science: notebook structure, data validation, reproducibility, and model documentation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Python data science: notebook structure, data validation, reproducibility, and model documentation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Architecture decisions: layering, design patterns, microservices trade-offs, and domain-driven design
Python architecture: PEP-8, type hints, clean layering, dependency injection, and testing strategy
General code review process: priority ordering, what to block on, how to give actionable feedback
Git workflow: branch naming, conventional commits, PR conventions, and merge strategies
TypeScript refactoring: SOLID principles, DRY, type safety improvements, and eliminating code smells
Security checklist: OWASP top 10, secret scanning, input validation, and auth patterns
| name | data-science-python |
| description | Python data science: notebook structure, data validation, reproducibility, and model documentation |
Organize notebooks in this order:
Keep notebooks for exploration. Move reusable logic to src/ Python modules with tests.
# Always validate after loading
assert df.shape[0] > 0, "DataFrame is empty"
assert df.isnull().sum().sum() == 0, f"Nulls found: {df.isnull().sum()}"
assert df['price'].between(0, 1_000_000).all(), "Price out of expected range"
# For production pipelines: use pandera
import pandera as pa
schema = pa.DataFrameSchema({
"price": pa.Column(float, pa.Check.ge(0)),
"category": pa.Column(str, pa.Check.isin(["A", "B", "C"])),
})
schema.validate(df)
import random
import numpy as np
SEED = 42
random.seed(SEED)
np.random.seed(SEED)
# sklearn: pass random_state=SEED to all estimators
requirements.txt or pyproject.toml.experiments/ log with metadata JSON.model_rf_20260115_v1.pkl.Document for every model:
# Extract transforms into sklearn Pipeline
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier
pipeline = Pipeline([
('scaler', StandardScaler()),
('classifier', RandomForestClassifier(random_state=SEED)),
])
tests/.pathlib.Path — never hardcode file paths.logging not print in production code.