Explain how you use pivot and merge operations in Python for data preparation.
For this SQL exercise, express the same preparation pattern by combining entity profiles with validated observations and presenting monthly scores as columns.
entity_id, entity_name, segment, jan_score, feb_score, and mar_score.entity_id ascending.| Column | Type | Description |
|---|---|---|
| entity_idPK | INT | Unique entity identifier |
| entity_name | VARCHAR(100) | Entity display name |
| segment | VARCHAR(50) | Business segment assigned to the entity |
| Column | Type | Description |
|---|---|---|
| observation_idPK | INT | Unique observation identifier |
| entity_id | INT | Entity associated with the observation |
| period | VARCHAR(7) | Observation month in YYYY-MM format |
| score | DECIMAL(6,2) | Prepared score for the period |
| validation_status | VARCHAR(20) | Validation state of the observation |