File size: 10,263 Bytes
463a104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "a = pd.read_parquet(\"data/test.parquet\")\n",
    "b = pd.read_parquet(\"data/passages.parquet\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>question</th>\n",
       "      <th>answer</th>\n",
       "      <th>relevant_passage_ids</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Is Hirschsprung disease a mendelian or a multi...</td>\n",
       "      <td>Coding sequence mutations in RET, GDNF, EDNRB,...</td>\n",
       "      <td>[20598273, 6650562, 15829955, 15617541, 230011...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>List signaling molecules (ligands) that intera...</td>\n",
       "      <td>The 7 known EGFR ligands  are: epidermal growt...</td>\n",
       "      <td>[23821377, 24323361, 23382875, 22247333, 23787...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Is the protein Papilin secreted?</td>\n",
       "      <td>Yes,  papilin is a secreted protein</td>\n",
       "      <td>[21784067, 19297413, 15094122, 7515725, 332004...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Are long non coding RNAs spliced?</td>\n",
       "      <td>Long non coding RNAs appear to be spliced thro...</td>\n",
       "      <td>[22955974, 21622663, 22707570, 22955988, 24285...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Is RANKL secreted from the cells?</td>\n",
       "      <td>Receptor activator of nuclear factor κB ligand...</td>\n",
       "      <td>[22867712, 23827649, 21618594, 23835909, 24265...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4714</th>\n",
       "      <td>Is PPROM a condition that occurs in males or f...</td>\n",
       "      <td>Preterm premature rupture of fetal membranes (...</td>\n",
       "      <td>[23599878, 23573382, 24304137, 18301713, 23179...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4715</th>\n",
       "      <td>What is EpiMethylTag?</td>\n",
       "      <td>EpiMethylTag is a fast, low-input, low sequenc...</td>\n",
       "      <td>[31752933]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4716</th>\n",
       "      <td>What is the target of Sutimlimab?</td>\n",
       "      <td>Sutimlimab is a novel humanized monoclonal ant...</td>\n",
       "      <td>[30635392, 31229501, 33826820, 32176765, 31114...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4717</th>\n",
       "      <td>Can parasite infections by Schistosoma japonic...</td>\n",
       "      <td>A peptide named as SJMHE1 from Schistosoma jap...</td>\n",
       "      <td>[26840774, 34703270, 28614408, 31496071, 18654...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4718</th>\n",
       "      <td>Describe Multilocus Inherited Neoplasia Allele...</td>\n",
       "      <td>Genetic testing of hereditary cancer using com...</td>\n",
       "      <td>[30580288]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4719 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                               question  \\\n",
       "id                                                        \n",
       "0     Is Hirschsprung disease a mendelian or a multi...   \n",
       "1     List signaling molecules (ligands) that intera...   \n",
       "2                      Is the protein Papilin secreted?   \n",
       "3                     Are long non coding RNAs spliced?   \n",
       "4                     Is RANKL secreted from the cells?   \n",
       "...                                                 ...   \n",
       "4714  Is PPROM a condition that occurs in males or f...   \n",
       "4715                              What is EpiMethylTag?   \n",
       "4716                  What is the target of Sutimlimab?   \n",
       "4717  Can parasite infections by Schistosoma japonic...   \n",
       "4718  Describe Multilocus Inherited Neoplasia Allele...   \n",
       "\n",
       "                                                 answer  \\\n",
       "id                                                        \n",
       "0     Coding sequence mutations in RET, GDNF, EDNRB,...   \n",
       "1     The 7 known EGFR ligands  are: epidermal growt...   \n",
       "2                   Yes,  papilin is a secreted protein   \n",
       "3     Long non coding RNAs appear to be spliced thro...   \n",
       "4     Receptor activator of nuclear factor κB ligand...   \n",
       "...                                                 ...   \n",
       "4714  Preterm premature rupture of fetal membranes (...   \n",
       "4715  EpiMethylTag is a fast, low-input, low sequenc...   \n",
       "4716  Sutimlimab is a novel humanized monoclonal ant...   \n",
       "4717  A peptide named as SJMHE1 from Schistosoma jap...   \n",
       "4718  Genetic testing of hereditary cancer using com...   \n",
       "\n",
       "                                   relevant_passage_ids  \n",
       "id                                                       \n",
       "0     [20598273, 6650562, 15829955, 15617541, 230011...  \n",
       "1     [23821377, 24323361, 23382875, 22247333, 23787...  \n",
       "2     [21784067, 19297413, 15094122, 7515725, 332004...  \n",
       "3     [22955974, 21622663, 22707570, 22955988, 24285...  \n",
       "4     [22867712, 23827649, 21618594, 23835909, 24265...  \n",
       "...                                                 ...  \n",
       "4714  [23599878, 23573382, 24304137, 18301713, 23179...  \n",
       "4715                                         [31752933]  \n",
       "4716  [30635392, 31229501, 33826820, 32176765, 31114...  \n",
       "4717  [26840774, 34703270, 28614408, 31496071, 18654...  \n",
       "4718                                         [30580288]  \n",
       "\n",
       "[4719 rows x 3 columns]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>passage</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>21495810</th>\n",
       "      <td>OBJECT: Factors determining choice of an acade...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26869762</th>\n",
       "      <td>Castleman disease (CD) is a rare, heterogeneou...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28049410</th>\n",
       "      <td>BACKGROUND: Data extraction and integration me...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24510469</th>\n",
       "      <td>Flecainide is recommended as a first-line anti...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8650761</th>\n",
       "      <td>Primary intestinal lymphangiectasia (PIL), fir...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                    passage\n",
       "id                                                         \n",
       "21495810  OBJECT: Factors determining choice of an acade...\n",
       "26869762  Castleman disease (CD) is a rare, heterogeneou...\n",
       "28049410  BACKGROUND: Data extraction and integration me...\n",
       "24510469  Flecainide is recommended as a first-line anti...\n",
       "8650761   Primary intestinal lymphangiectasia (PIL), fir..."
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}