I want to create a condition where if a column (e.g., 10/15/2024) contains 'X', it should be replaced with the value from the first row of that column (e.g., 5805). Essentially, all occurrences of 'X' in the column should be replaced with the column's first-row value
| Input | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| F1 | F2 | F3 | F4 | 10/15/2024 | 2024-10-15_2 | 2024-10-15_3 | 2024-10-15_4 | 2024-10-15_5 | 2024-10-15_6 | 2024-10-15_7 | 2024-10-15_8 | 2024-10-15_9 | 2024-10-15_10 |
| Categories of NC | Level 1 | Level 0 | Issue count | 5805 | 5806 | 5807 | 5808 | 5809 | 5810 | 5811 | 5812 | 5813 | 5814 |
| Assembly | Piercing system Assembly Error | Piercing system: Belt alignment | 5 | | | | | | 0 | | | 0 | 0 |
| Assembly | Piercing system Assembly Error | Thumb Screw not secured | 1 | | | | | | | | | | |
| Assembly | Piercing system Assembly Error | Piercing system Tubing rubbing against RC clip | 2 | 0 | | | | | | | | | |
| Assembly | Piercing system Assembly Error | Piercing system: Tubing routed incorrectly | 7 | 0 | | | 0 | | | | | 0 | 0 |
| | | | | | | | | | | | | | |
| Replace all 0s in the column with the value from the first row |
| Output | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| F1 | F2 | F3 | F4 | 10/15/2024 | 2024-10-15_2 | 2024-10-15_3 | 2024-10-15_4 | 2024-10-15_5 | 2024-10-15_6 | 2024-10-15_7 | 2024-10-15_8 | 2024-10-15_9 | 2024-10-15_10 |
| Categories of NC | Level 1 | Level 0 | Issue count | 5805 | 5806 | 5807 | 5808 | 5809 | 5810 | 5811 | 5812 | 5813 | 5814 |
| Assembly | Piercing system Assembly Error | Piercing system: Belt alignment | 5 | | | | | | 5810 | | | 5813 | 5814 |
| Assembly | Piercing system Assembly Error | Thumb Screw not secured | 1 | | | | | | | | | | |
| Assembly | Piercing system Assembly Error | Piercing system Tubing rubbing against RC clip | 2 | 5805 | | | | | | | | | |
| Assembly | Piercing system Assembly Error | Piercing system: Tubing routed incorrectly | 7 | 5805 | | | 5808 | | | | | 5813 | 5814 |