I would like to turn:
DateTime ColumnName Min Avg Max
2012-10-14 11:29:23.810000 Percent_Used 24 24 24
2012-10-14 11:29:23.810000 Current_Count 254503 254503 254503
2012-10-14 11:29:23.810000 Max 1048576 1048576 1048576
2012-10-14 11:34:23.813000 Percent_Used 24 24 24
2012-10-14 11:34:23.813000 Current_Count 254116 254116 254116
2012-10-14 11:34:23.813000 Max 1048576 1048576 1048576
In a data frame where DateTimes are unique (index) and columns:
DataTime, Percent_Used_Min, Percent_Used_Avg, Percent_Used_Max, Current_Count_Min, Current_Count_Avg, Current_Count_Max, Max_Min, Max_Avg, Max_Max
Basically, I want to simulate R melt / cast without falling into hierarchical indexing or stacked data frames. I can't seem to accurately reproduce the above game with stack / unpack, melt or turntable / turntable. Is there a good way to do this?
As an example, in R, it will be something like:
dynamic_melt = melt(dynamic, id = c("DateTime", "ColumnName"))
recast = data.frame(cast(dynamic_melt, DateTime ~ ...))
The above data will be variables (i.e. ColumnName values will not always be the same, there may be more or less, as well as different names).