-
Notifications
You must be signed in to change notification settings - Fork 1
/
melt.html
84 lines (84 loc) · 3.14 KB
/
melt.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<html>
<head>
<script src='anim.js'></script>
<script>
window.addEventListener( 'load', function () {
addBoxes(
'First', 1, 0, 1, 0,
'Last', 2, 0, 2, 0, { w1 : 2, w2 : 2 },
'variable', -1000, 0, 4, 0,
'value', -1000, 0, 5, 0,
'', 0, 0, 0, 0,
'3', 0, 3, 0, 4,
'4', 0, 3, 0, 5,
'5', 0, 3, 0, 6,
'6', 0, 3, 0, 7,
'7', 0, 3, 0, 8,
'8', 0, 3, 0, 9,
'0', 0, 1, 0, 1,
'1', 0, 2, 0, 2,
'2', 0, 3, 0, 3,
);
setColor( '#ddddff' );
addBoxes(
'SAT', 4, 0, 4, 1,
'SAT', 4, 0, 4, 2,
'SAT', 4, 0, 4, 3,
'ACT', 5, 0, 4, 4,
'ACT', 5, 0, 4, 5,
'ACT', 5, 0, 4, 6,
'GPA', 6, 0, 4, 7,
'GPA', 6, 0, 4, 8,
'GPA', 6, 0, 4, 9,
);
setColor( '#dddddd' );
addBoxes(
'Abe', 1, 1, 1, 1,
'Amy', 1, 2, 1, 2,
'Art', 1, 3, 1, 3,
'Abe', 1, 1, 1, 4,
'Amy', 1, 2, 1, 5,
'Art', 1, 3, 1, 6,
'Abe', 1, 1, 1, 7,
'Amy', 1, 2, 1, 8,
'Art', 1, 3, 1, 9,
);
setColor( '#dddddd' );
addBoxes(
'Smith', 2, 1, 2, 1, { w1 : 2, w2 : 2 },
'Sully', 2, 2, 2, 2, { w1 : 2, w2 : 2 },
'Smart', 2, 3, 2, 3, { w1 : 2, w2 : 2 },
'Smith', 2, 1, 2, 4, { w1 : 2, w2 : 2 },
'Sully', 2, 2, 2, 5, { w1 : 2, w2 : 2 },
'Smart', 2, 3, 2, 6, { w1 : 2, w2 : 2 },
'Smith', 2, 1, 2, 7, { w1 : 2, w2 : 2 },
'Sully', 2, 2, 2, 8, { w1 : 2, w2 : 2 },
'Smart', 2, 3, 2, 9, { w1 : 2, w2 : 2 },
);
setColor( '#ddffdd' );
addBoxes(
'123', 4, 1, 5, 1,
'234', 4, 2, 5, 2,
'345', 4, 3, 5, 3
);
setColor( '#ddffdd' );
addBoxes(
'456', 5, 1, 5, 4,
'567', 5, 2, 5, 5,
'678', 5, 3, 5, 6
);
setColor( '#ddffdd' );
addBoxes(
'2.0', 6, 1, 5, 7,
'3.0', 6, 2, 5, 8,
'4.0', 6, 3, 5, 9
);
} );
</script>
</head>
<body>
<h1>Melt</h1>
<pre>df.melt( id_vars=["First","Last"], value_vars=["SAT","ACT","GPA"] )</pre>
<hr/>
</body>
</html>