Hello!
I am trying to edit a csv file. This is my original csv file
"TINAMIFORMES",,,,
,"Tinamidae",,,
,,"Tinamus",,
,,,"tao","Grey Tinamou"
,,,"solitarius","Solitary Tinamou"
,,,"osgoodi","Black Tinamou"
,,,"major","Great Tinamou"
,,,"guttatus","White-throated Tinamou"
,,"Nothocercus",,
,,,"bonapartei","Highland Tinamou"
,,,"julius","Tawny-breasted Tinamou"
,,,"nigrocapillus","Hooded Tinamou"
,,"Crypturellus",,
,,,"berlepschi","Berlepsch's Tinamou"
,,,"cinereus","Cinereous Tinamou"
,,,"soui","Little Tinamou"
,,,"ptaritepui","Tepui Tinamou"
,,,"obsoletus","Brown Tinamou"
,,,"undulatus","Undulated Tinamou"
,,,"transfasciatus","Pale-browed Tinamou"
,,,"strigulosus","Brazilian Tinamou"
,,,"duidae","Grey-legged Tinamou"
,,,"erythropus","Red-legged Tinamou"
,,,"noctivagus","Yellow-legged Tinamou"
,,,"atrocapillus","Black-capped Tinamou"
,,,"cinnamomeus","Thicket Tinamou"
,,,"boucardi","Slaty-breasted Tinamou"
,,,"kerriae","Choco Tinamou"
,,,"variegatus","Variegated Tinamou"
,,,"brevirostris","Rusty Tinamou"
,,,"bartletti","Bartlett's Tinamou"
,,,"parvirostris","Small-billed Tinamou"
,,,"casiquiare","Barred Tinamou"
,,,"tataupa","Tataupa Tinamou"
,,"Rhynchotus",,
,,,"rufescens","Red-winged Tinamou"
,,,"maculicollis","Huayco Tinamou"
,,"Nothoprocta",,
,,,"taczanowskii","Taczanowski's Tinamou"
,,,"ornata","Ornate Tinamou"
,,,"perdicaria","Chilean Tinamou"
,,,"cinerascens","Brushland Tinamou"
,,,"pentlandii","Andean Tinamou"
,,,"curvirostris","Curve-billed Tinamou"
,,"Nothura",,
,,,"boraquira","White-bellied Nothura"
,,,"minor","Lesser Nothura"
,,,"darwinii","Darwin's Nothura"
,,,"maculosa","Spotted Nothura"
,,,"chacoensis","Chaco Nothura"
,,"Taoniscus",,
,,,"nanus","Dwarf Tinamou"
,,"Eudromia",,
,,,"elegans","Elegant Crested Tinamou"
,,,"formosa","Quebracho Crested Tinamou"
,,"Tinamotis",,
,,,"pentlandii","Puna Tinamou"
,,,"ingoufi","Patagonian Tinamou"
And this is how I would like it to be
"ORDRE TINAMIFORMES",,
"Family Tinamidae",,
"Tinamus","tao","Grey Tinamou"
"Tinamus","solitarius","Solitary Tinamou"
"Tinamus","osgoodi","Black Tinamou"
"Tinamus","major","Great Tinamou"
"Tinamus","guttatus","White-throated Tinamou"
"Nothocercus","bonapartei","Highland Tinamou"
"Nothocercus","julius","Tawny-breasted Tinamou"
"Nothocercus","nigrocapillus","Hooded Tinamou"
"Crypturellus","berlepschi","Berlepsch's Tinamou"
"Crypturellus","cinereus","Cinereous Tinamou"
"Crypturellus","soui","Little Tinamou"
"Crypturellus","ptaritepui","Tepui Tinamou"
"Crypturellus","obsoletus","Brown Tinamou"
"Crypturellus","undulatus","Undulated Tinamou"
"Crypturellus","transfasciatus","Pale-browed Tinamou"
"Crypturellus","strigulosus","Brazilian Tinamou"
"Crypturellus","duidae","Grey-legged Tinamou"
"Crypturellus","erythropus","Red-legged Tinamou"
"Crypturellus","noctivagus","Yellow-legged Tinamou"
"Crypturellus","atrocapillus","Black-capped Tinamou"
"Crypturellus","cinnamomeus","Thicket Tinamou"
"Crypturellus","boucardi","Slaty-breasted Tinamou"
"Crypturellus","kerriae","Choco Tinamou"
"Crypturellus","variegatus","Variegated Tinamou"
"Crypturellus","brevirostris","Rusty Tinamou"
"Crypturellus","bartletti","Bartlett's Tinamou"
"Crypturellus","parvirostris","Small-billed Tinamou"
"Crypturellus","casiquiare","Barred Tinamou"
"Crypturellus","tataupa","Tataupa Tinamou"
"Rhynchotus","rufescens","Red-winged Tinamou"
"Rhynchotus","maculicollis","Huayco Tinamou"
"Nothoprocta","taczanowskii","Taczanowski's Tinamou"
"Nothoprocta","ornata","Ornate Tinamou"
"Nothoprocta","perdicaria","Chilean Tinamou"
"Nothoprocta","cinerascens","Brushland Tinamou"
"Nothoprocta","pentlandii","Andean Tinamou"
"Nothoprocta","curvirostris","Curve-billed Tinamou"
"Nothura","boraquira","White-bellied Nothura"
"Nothura","minor","Lesser Nothura"
"Nothura","darwinii","Darwin's Nothura"
"Nothura","maculosa","Spotted Nothura"
"Nothura","chacoensis","Chaco Nothura"
"Taoniscus","nanus","Dwarf Tinamou"
"Eudromia","elegans","Elegant Crested Tinamou"
"Eudromia","formosa","Quebracho Crested Tinamou"
"Tinamotis","pentlandii","Puna Tinamou"
"Tinamotis","ingoufi","Patagonian Tinamou"
Basically, I would like to add the string "Order" in all the fields with a string in column A; add the string "Family" in all the fields with a string in column B; copy the first field in column C in the fields below until it finds a non empty field, then delete the first fild; and finally move the columns C, D and E to A, B and C. I am trying to use it with the csv module, but I am quite confused. Can anyone help?
Cheers!
Dani