I have data like below in csv, need to load this into data frame, how to achieve this:
CSV
row1 -- Location1
row2 -- Date 1/1/2017 1/2/2017 1/3/2017......
row3 -- Metric1 324 657 987
row4 -- Metric2 9 9 9
row5 -- Metric3 0.45 2.4 2.9
row6 -- Location 2
row7 -- Date 1/1/2017 1/2/2017 1/3/2017......
row8 -- Metric1 324 657 987
row9 -- Metric2 9 9 9
row10-- Metric3 0.45 2.4 2.9
row11 -- Location 3
row12 -- Date 1/1/2017 1/2/2017 1/3/2017......
row13 -- Metric1 324 657 987
row14 -- Metric2 9 9 9
row15-- Metric3 0.45 2.4 2.9
I want to load this to a dataframe like this Location Date Metric1 Metric2 Metric3 Loc1 1/1/2017 324 ... Loc1 2/1/2017 657 ... Loc1 3/1/2017 987 ...
Loc2
Loc2 Loc2
Loc3
I want to load this to a dataframe like this Location Date Metric1 Metric2 Metric3 Loc1 1/1/2017 324 ... Loc1 2/1/2017 657 ... Loc1 3/1/2017 987 ...
Loc2
Loc2 Loc2
Loc3
Comments
Post a Comment