У меня есть CSV-файл, подобный этому
"id","accreditation_body","score","max_score","has_score"
"251","NAAC","7.2","",""
"2026","NAAC","0","",""
"264","NAAC","3.02","",""
Я хочу преобразовать его в файл yaml, как показано ниже, используя pyspark
- id: '251'
accreditation_body: NAAC
score: '7.2'
max_score: ''
has_score: ''
- id: '2026'
accreditation_body: NAAC
score: '0'
max_score: ''
has_score: ''
- id: '264'
accreditation_body: NAAC
score: '3.02'
max_score: ''
has_score: ''