回答編集履歴
1
わかりやすくするためコードの関数の位置を変更しました。
test
CHANGED
@@ -56,16 +56,6 @@
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
df = pd.DataFrame({
|
60
|
-
|
61
|
-
'other1': ['a', 'b'],
|
62
|
-
|
63
|
-
'other2': ['c', 'd'],
|
64
|
-
|
65
|
-
'gene': ['GSTM1', 'LOC101927027,PRKRA'],
|
66
|
-
|
67
|
-
})
|
68
|
-
|
69
59
|
|
70
60
|
|
71
61
|
def stack_with_column(df, column):
|
@@ -101,6 +91,20 @@
|
|
101
91
|
)
|
102
92
|
|
103
93
|
return stacked
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
df = pd.DataFrame({
|
100
|
+
|
101
|
+
'other1': ['a', 'b'],
|
102
|
+
|
103
|
+
'other2': ['c', 'd'],
|
104
|
+
|
105
|
+
'gene': ['GSTM1', 'LOC101927027,PRKRA'],
|
106
|
+
|
107
|
+
})
|
104
108
|
|
105
109
|
|
106
110
|
|