# P13.4 Python Project 4: NumPy सह Delivery Time Report

Source: https://ravindrabagale.com/mr/datascience/py13-python-mini-projects-for-beginners-practice-before-pandas/p13-4-python-project-4-delivery-time-report-with-numpy.html
Language: mr (Marathi with English technical terms)

हे का शिकायचं?

NumPy statistics आणि filtering एकाच report मध्ये.

हे काय आहे?

प्रत्येक hub चा average, median, 90th percentile आणि उशिरा झालेल्या deliveries चा % काढू.

कसं करायचं?

Step 1. Hub नुसार times arrays मध्ये ठेवा.
Step 2. Statistics काढा.
Step 3. Late % काढा.

उदाहरण A: Hub report

```python
import numpy as np
hubs = {
    "Pune": np.array([18, 22, 35, 19, 25, 41]),
    "Mumbai": np.array([28, 33, 31, 26, 38, 29]),
    "Nashik": np.array([15, 17, 21, 19, 16, 23]),
}
print(f"{'Hub':<8}{'Mean':>6}{'Median':>8}{'Late%':>7}")
for hub, m in hubs.items():
    late = (m > 30).mean() * 100
    print(f"{hub:<8}{m.mean():>6.1f}{np.median(m):>8.1f}{late:>6.0f}%")
slowest = max(hubs, key=lambda h: hubs[h].mean())
print("Slowest hub:", slowest)
```

Output:

```text
Hub       Mean  Median  Late%
Pune      26.7    23.5    33%
Mumbai    30.8    30.0    50%
Nashik    18.5    18.0     0%
Slowest hub: Mumbai
```

याचा अर्थ: प्रत्येक hub ची एक line summary मिळाली.

रवींद्र बागले यांची tip

`(condition).mean()` ही युक्ती एका step मध्ये percentage देते. pandas मध्येही वापराल.
