I got a csv file with two headers, and I don't know how to express it either, I pasted it and this is what it looks like, I need to reorder it to be a normal csv file,No information in "age" key,I just want to retrieve "name" and "age",I need to output "first_name","last_name","age". And use "first_name","last_name","age" as the title,
"ID","meta_key","meta_data"
1,"nickname","dale ganger"
2,"first_name","ganger"
3,"last_name","dale"
4,"age",
5,"sex","F"
the way i need
"first_name","last_name","age"
"ganger","dale",null
import pandas as pdanddf = pd.read_csv('data.csv'). It will handle headers for you, then you can do your manipulations. Because what you have pasted seems a transposed version of column names: meta_key, nickname, first_name, last_name, age, sex - mmustafaicer