Test data fileI am working with a dataframe that I created from a CSV file. The data has header rows throughout the data, which identify something about the rows below that data, until the next header row.
The data looks something like this.
2001| |colour |Price | Quantity sold<br>
Shoes|<br>
Blank | High heal Shoes| red |£22|44<br>
Blank | Low heal Shoes|red |£22|44<br>
Slippers|<br>
Blank | High heal Slippers| red |£22|44<br>
Blank | High heal Slippers| blue |£22|44<br>
Blank | Low heal Slippers| red |£22|44<br>
2002| |colour |Price | Quantity sold<br>
Shoes|<br>
Blank | High heal Shoes| red |£22|44<br>
Blank | Low heal Shoes|red |£22|44<br>
Slippers|<br>
Blank | High heal Slippers| red |£22|44<br>
Blank | High heal Slippers| blue |£22|44<br>
Blank | Low heal Slippers| red |£22|44<br>
What type of structure is this?
I need to read through this dataframe get all data on a particular item (say Slippers) for each year from the header row (so 2001, 2002 and so on). Even adding a row with the corresponding year next to each data row would help.
I will appreciate some help on how to do that?