comparison Untitled.ipynb @ 0:a3fd214e7555 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/numeric_clustering commit bafd56379ff227fb81f8cd61d708ebc39814da54
author bgruening
date Fri, 01 Jan 2016 18:37:54 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a3fd214e7555
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 29,
6 "metadata": {
7 "collapsed": false
8 },
9 "outputs": [
10 {
11 "data": {
12 "text/plain": [
13 "KMeans(copy_x=True, init='k-means++', max_iter=300, n_clusters=8, n_init=10,\n",
14 " n_jobs=1, precompute_distances='auto', random_state=None, tol=0.0001,\n",
15 " verbose=0)"
16 ]
17 },
18 "execution_count": 29,
19 "metadata": {},
20 "output_type": "execute_result"
21 }
22 ],
23 "source": [
24 "import sys\n",
25 "import json\n",
26 "import numpy as np\n",
27 "import sklearn.cluster\n",
28 "import pandas\n",
29 "\n",
30 "data = pandas.read_csv(\"/home/bag/projects/code/galaxytools/tools/numeric_clustering/test-data/numeric_values.tabular\", sep='\\t', header=0, index_col=None, parse_dates=True, encoding=None )\n",
31 "my_class = getattr(sklearn.cluster, \"KMeans\")\n",
32 "cluster_object = my_class()\n",
33 "\n",
34 "params = dict()\n",
35 "cluster_object.set_params(**params)\n"
36 ]
37 },
38 {
39 "cell_type": "code",
40 "execution_count": 32,
41 "metadata": {
42 "collapsed": false
43 },
44 "outputs": [
45 {
46 "name": "stdout",
47 "output_type": "stream",
48 "text": [
49 "[0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1\n",
50 " 2 2 2 2 2 2 2 2 2 2 2] 48 48\n",
51 " 0\n",
52 "0 0\n",
53 "1 0\n",
54 "2 0\n",
55 "3 0\n",
56 "4 0\n",
57 "5 0\n",
58 "6 0\n",
59 "7 0\n",
60 "8 0\n",
61 "9 0\n",
62 "10 0\n",
63 "11 0\n",
64 "12 3\n",
65 "13 3\n",
66 "14 3\n",
67 "15 3\n",
68 "16 3\n",
69 "17 3\n",
70 "18 3\n",
71 "19 3\n",
72 "20 3\n",
73 "21 3\n",
74 "22 3\n",
75 "23 3\n",
76 "24 3\n",
77 "25 1\n",
78 "26 1\n",
79 "27 1\n",
80 "28 1\n",
81 "29 1\n",
82 "30 1\n",
83 "31 1\n",
84 "32 1\n",
85 "33 1\n",
86 "34 1\n",
87 "35 1\n",
88 "36 1\n",
89 "37 2\n",
90 "38 2\n",
91 "39 2\n",
92 "40 2\n",
93 "41 2\n",
94 "42 2\n",
95 "43 2\n",
96 "44 2\n",
97 "45 2\n",
98 "46 2\n",
99 "47 2\n"
100 ]
101 }
102 ],
103 "source": [
104 "\n",
105 "if 4 >= 4:\n",
106 " data_matrix = data.values[:, 1-1:1]\n",
107 " #print data_matrix\n",
108 "else:\n",
109 " data_matrix = data.values\n",
110 "\n",
111 "prediction = cluster_object.fit_predict( data_matrix )\n",
112 "print prediction, len(prediction), len(data_matrix)\n",
113 "\n",
114 "pred = pandas.DataFrame(prediction)\n",
115 "print pred\n",
116 "\n",
117 "#data[len(data.columns)] = prediction\n",
118 "#data.to_csv(path_or_buf = \"foo.tab\", sep=\"\\t\")\n"
119 ]
120 },
121 {
122 "cell_type": "code",
123 "execution_count": 34,
124 "metadata": {
125 "collapsed": false
126 },
127 "outputs": [
128 {
129 "data": {
130 "text/html": [
131 "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
132 "<table border=\"1\" class=\"dataframe\">\n",
133 " <thead>\n",
134 " <tr style=\"text-align: right;\">\n",
135 " <th></th>\n",
136 " <th>0</th>\n",
137 " <th>-67</th>\n",
138 " <th>0</th>\n",
139 " <th>56</th>\n",
140 " <th>58</th>\n",
141 " </tr>\n",
142 " </thead>\n",
143 " <tbody>\n",
144 " <tr>\n",
145 " <th>0 </th>\n",
146 " <td>NaN</td>\n",
147 " <td> -76</td>\n",
148 " <td> 0</td>\n",
149 " <td> 64</td>\n",
150 " <td> 44</td>\n",
151 " </tr>\n",
152 " <tr>\n",
153 " <th>1 </th>\n",
154 " <td>NaN</td>\n",
155 " <td> -73</td>\n",
156 " <td> 0</td>\n",
157 " <td> 48</td>\n",
158 " <td> 51</td>\n",
159 " </tr>\n",
160 " <tr>\n",
161 " <th>2 </th>\n",
162 " <td>NaN</td>\n",
163 " <td> -49</td>\n",
164 " <td> 0</td>\n",
165 " <td> 65</td>\n",
166 " <td> 58</td>\n",
167 " </tr>\n",
168 " <tr>\n",
169 " <th>3 </th>\n",
170 " <td>NaN</td>\n",
171 " <td> -49</td>\n",
172 " <td> 0</td>\n",
173 " <td> 61</td>\n",
174 " <td> 43</td>\n",
175 " </tr>\n",
176 " <tr>\n",
177 " <th>4 </th>\n",
178 " <td>NaN</td>\n",
179 " <td> -79</td>\n",
180 " <td> 0</td>\n",
181 " <td> 43</td>\n",
182 " <td> 45</td>\n",
183 " </tr>\n",
184 " <tr>\n",
185 " <th>5 </th>\n",
186 " <td>NaN</td>\n",
187 " <td> -98</td>\n",
188 " <td> 0</td>\n",
189 " <td> 60</td>\n",
190 " <td> 42</td>\n",
191 " </tr>\n",
192 " <tr>\n",
193 " <th>6 </th>\n",
194 " <td>NaN</td>\n",
195 " <td> -59</td>\n",
196 " <td> 0</td>\n",
197 " <td> 55</td>\n",
198 " <td> 50</td>\n",
199 " </tr>\n",
200 " <tr>\n",
201 " <th>7 </th>\n",
202 " <td>NaN</td>\n",
203 " <td> -56</td>\n",
204 " <td> 0</td>\n",
205 " <td> 53</td>\n",
206 " <td> 53</td>\n",
207 " </tr>\n",
208 " <tr>\n",
209 " <th>8 </th>\n",
210 " <td>NaN</td>\n",
211 " <td> -61</td>\n",
212 " <td> 0</td>\n",
213 " <td> 44</td>\n",
214 " <td> 45</td>\n",
215 " </tr>\n",
216 " <tr>\n",
217 " <th>9 </th>\n",
218 " <td>NaN</td>\n",
219 " <td> -84</td>\n",
220 " <td> 0</td>\n",
221 " <td> 65</td>\n",
222 " <td> 43</td>\n",
223 " </tr>\n",
224 " <tr>\n",
225 " <th>10</th>\n",
226 " <td>NaN</td>\n",
227 " <td> -75</td>\n",
228 " <td> 0</td>\n",
229 " <td> 52</td>\n",
230 " <td> 35</td>\n",
231 " </tr>\n",
232 " <tr>\n",
233 " <th>11</th>\n",
234 " <td>NaN</td>\n",
235 " <td> -70</td>\n",
236 " <td> 0</td>\n",
237 " <td> 56</td>\n",
238 " <td> 56</td>\n",
239 " </tr>\n",
240 " <tr>\n",
241 " <th>12</th>\n",
242 " <td>NaN</td>\n",
243 " <td> 43</td>\n",
244 " <td> 1</td>\n",
245 " <td> 86</td>\n",
246 " <td> -61</td>\n",
247 " </tr>\n",
248 " <tr>\n",
249 " <th>13</th>\n",
250 " <td>NaN</td>\n",
251 " <td> 15</td>\n",
252 " <td> 1</td>\n",
253 " <td> 93</td>\n",
254 " <td> -67</td>\n",
255 " </tr>\n",
256 " <tr>\n",
257 " <th>14</th>\n",
258 " <td>NaN</td>\n",
259 " <td> 36</td>\n",
260 " <td> 1</td>\n",
261 " <td> 94</td>\n",
262 " <td> -59</td>\n",
263 " </tr>\n",
264 " <tr>\n",
265 " <th>15</th>\n",
266 " <td>NaN</td>\n",
267 " <td> 62</td>\n",
268 " <td> 1</td>\n",
269 " <td> 92</td>\n",
270 " <td> -50</td>\n",
271 " </tr>\n",
272 " <tr>\n",
273 " <th>16</th>\n",
274 " <td>NaN</td>\n",
275 " <td> 70</td>\n",
276 " <td> 1</td>\n",
277 " <td> 91</td>\n",
278 " <td> -78</td>\n",
279 " </tr>\n",
280 " <tr>\n",
281 " <th>17</th>\n",
282 " <td>NaN</td>\n",
283 " <td> 47</td>\n",
284 " <td> 1</td>\n",
285 " <td> 87</td>\n",
286 " <td> -35</td>\n",
287 " </tr>\n",
288 " <tr>\n",
289 " <th>18</th>\n",
290 " <td>NaN</td>\n",
291 " <td> 52</td>\n",
292 " <td> 1</td>\n",
293 " <td> 91</td>\n",
294 " <td> -56</td>\n",
295 " </tr>\n",
296 " <tr>\n",
297 " <th>19</th>\n",
298 " <td>NaN</td>\n",
299 " <td> 46</td>\n",
300 " <td> 1</td>\n",
301 " <td> 81</td>\n",
302 " <td> -61</td>\n",
303 " </tr>\n",
304 " <tr>\n",
305 " <th>20</th>\n",
306 " <td>NaN</td>\n",
307 " <td> 34</td>\n",
308 " <td> 1</td>\n",
309 " <td> 78</td>\n",
310 " <td> -83</td>\n",
311 " </tr>\n",
312 " <tr>\n",
313 " <th>21</th>\n",
314 " <td>NaN</td>\n",
315 " <td> 45</td>\n",
316 " <td> 1</td>\n",
317 " <td> 87</td>\n",
318 " <td> -50</td>\n",
319 " </tr>\n",
320 " <tr>\n",
321 " <th>22</th>\n",
322 " <td>NaN</td>\n",
323 " <td> 50</td>\n",
324 " <td> 1</td>\n",
325 " <td> 73</td>\n",
326 " <td> -67</td>\n",
327 " </tr>\n",
328 " <tr>\n",
329 " <th>23</th>\n",
330 " <td>NaN</td>\n",
331 " <td> 45</td>\n",
332 " <td> 1</td>\n",
333 " <td> 97</td>\n",
334 " <td> -50</td>\n",
335 " </tr>\n",
336 " <tr>\n",
337 " <th>24</th>\n",
338 " <td>NaN</td>\n",
339 " <td> 45</td>\n",
340 " <td> 1</td>\n",
341 " <td> 111</td>\n",
342 " <td> -61</td>\n",
343 " </tr>\n",
344 " <tr>\n",
345 " <th>25</th>\n",
346 " <td>NaN</td>\n",
347 " <td> -92</td>\n",
348 " <td> 2</td>\n",
349 " <td> 23</td>\n",
350 " <td>-109</td>\n",
351 " </tr>\n",
352 " <tr>\n",
353 " <th>26</th>\n",
354 " <td>NaN</td>\n",
355 " <td> -96</td>\n",
356 " <td> 2</td>\n",
357 " <td> 20</td>\n",
358 " <td> -94</td>\n",
359 " </tr>\n",
360 " <tr>\n",
361 " <th>27</th>\n",
362 " <td>NaN</td>\n",
363 " <td> -88</td>\n",
364 " <td> 2</td>\n",
365 " <td> 26</td>\n",
366 " <td> -85</td>\n",
367 " </tr>\n",
368 " <tr>\n",
369 " <th>28</th>\n",
370 " <td>NaN</td>\n",
371 " <td>-114</td>\n",
372 " <td> 2</td>\n",
373 " <td> 33</td>\n",
374 " <td> -90</td>\n",
375 " </tr>\n",
376 " <tr>\n",
377 " <th>29</th>\n",
378 " <td>NaN</td>\n",
379 " <td>-106</td>\n",
380 " <td> 2</td>\n",
381 " <td> 9</td>\n",
382 " <td> -63</td>\n",
383 " </tr>\n",
384 " <tr>\n",
385 " <th>...</th>\n",
386 " <td>...</td>\n",
387 " <td>...</td>\n",
388 " <td>...</td>\n",
389 " <td>...</td>\n",
390 " <td>...</td>\n",
391 " </tr>\n",
392 " <tr>\n",
393 " <th>18</th>\n",
394 " <td> 3</td>\n",
395 " <td> NaN</td>\n",
396 " <td>NaN</td>\n",
397 " <td> NaN</td>\n",
398 " <td> NaN</td>\n",
399 " </tr>\n",
400 " <tr>\n",
401 " <th>19</th>\n",
402 " <td> 3</td>\n",
403 " <td> NaN</td>\n",
404 " <td>NaN</td>\n",
405 " <td> NaN</td>\n",
406 " <td> NaN</td>\n",
407 " </tr>\n",
408 " <tr>\n",
409 " <th>20</th>\n",
410 " <td> 3</td>\n",
411 " <td> NaN</td>\n",
412 " <td>NaN</td>\n",
413 " <td> NaN</td>\n",
414 " <td> NaN</td>\n",
415 " </tr>\n",
416 " <tr>\n",
417 " <th>21</th>\n",
418 " <td> 3</td>\n",
419 " <td> NaN</td>\n",
420 " <td>NaN</td>\n",
421 " <td> NaN</td>\n",
422 " <td> NaN</td>\n",
423 " </tr>\n",
424 " <tr>\n",
425 " <th>22</th>\n",
426 " <td> 3</td>\n",
427 " <td> NaN</td>\n",
428 " <td>NaN</td>\n",
429 " <td> NaN</td>\n",
430 " <td> NaN</td>\n",
431 " </tr>\n",
432 " <tr>\n",
433 " <th>23</th>\n",
434 " <td> 3</td>\n",
435 " <td> NaN</td>\n",
436 " <td>NaN</td>\n",
437 " <td> NaN</td>\n",
438 " <td> NaN</td>\n",
439 " </tr>\n",
440 " <tr>\n",
441 " <th>24</th>\n",
442 " <td> 3</td>\n",
443 " <td> NaN</td>\n",
444 " <td>NaN</td>\n",
445 " <td> NaN</td>\n",
446 " <td> NaN</td>\n",
447 " </tr>\n",
448 " <tr>\n",
449 " <th>25</th>\n",
450 " <td> 1</td>\n",
451 " <td> NaN</td>\n",
452 " <td>NaN</td>\n",
453 " <td> NaN</td>\n",
454 " <td> NaN</td>\n",
455 " </tr>\n",
456 " <tr>\n",
457 " <th>26</th>\n",
458 " <td> 1</td>\n",
459 " <td> NaN</td>\n",
460 " <td>NaN</td>\n",
461 " <td> NaN</td>\n",
462 " <td> NaN</td>\n",
463 " </tr>\n",
464 " <tr>\n",
465 " <th>27</th>\n",
466 " <td> 1</td>\n",
467 " <td> NaN</td>\n",
468 " <td>NaN</td>\n",
469 " <td> NaN</td>\n",
470 " <td> NaN</td>\n",
471 " </tr>\n",
472 " <tr>\n",
473 " <th>28</th>\n",
474 " <td> 1</td>\n",
475 " <td> NaN</td>\n",
476 " <td>NaN</td>\n",
477 " <td> NaN</td>\n",
478 " <td> NaN</td>\n",
479 " </tr>\n",
480 " <tr>\n",
481 " <th>29</th>\n",
482 " <td> 1</td>\n",
483 " <td> NaN</td>\n",
484 " <td>NaN</td>\n",
485 " <td> NaN</td>\n",
486 " <td> NaN</td>\n",
487 " </tr>\n",
488 " <tr>\n",
489 " <th>30</th>\n",
490 " <td> 1</td>\n",
491 " <td> NaN</td>\n",
492 " <td>NaN</td>\n",
493 " <td> NaN</td>\n",
494 " <td> NaN</td>\n",
495 " </tr>\n",
496 " <tr>\n",
497 " <th>31</th>\n",
498 " <td> 1</td>\n",
499 " <td> NaN</td>\n",
500 " <td>NaN</td>\n",
501 " <td> NaN</td>\n",
502 " <td> NaN</td>\n",
503 " </tr>\n",
504 " <tr>\n",
505 " <th>32</th>\n",
506 " <td> 1</td>\n",
507 " <td> NaN</td>\n",
508 " <td>NaN</td>\n",
509 " <td> NaN</td>\n",
510 " <td> NaN</td>\n",
511 " </tr>\n",
512 " <tr>\n",
513 " <th>33</th>\n",
514 " <td> 1</td>\n",
515 " <td> NaN</td>\n",
516 " <td>NaN</td>\n",
517 " <td> NaN</td>\n",
518 " <td> NaN</td>\n",
519 " </tr>\n",
520 " <tr>\n",
521 " <th>34</th>\n",
522 " <td> 1</td>\n",
523 " <td> NaN</td>\n",
524 " <td>NaN</td>\n",
525 " <td> NaN</td>\n",
526 " <td> NaN</td>\n",
527 " </tr>\n",
528 " <tr>\n",
529 " <th>35</th>\n",
530 " <td> 1</td>\n",
531 " <td> NaN</td>\n",
532 " <td>NaN</td>\n",
533 " <td> NaN</td>\n",
534 " <td> NaN</td>\n",
535 " </tr>\n",
536 " <tr>\n",
537 " <th>36</th>\n",
538 " <td> 1</td>\n",
539 " <td> NaN</td>\n",
540 " <td>NaN</td>\n",
541 " <td> NaN</td>\n",
542 " <td> NaN</td>\n",
543 " </tr>\n",
544 " <tr>\n",
545 " <th>37</th>\n",
546 " <td> 2</td>\n",
547 " <td> NaN</td>\n",
548 " <td>NaN</td>\n",
549 " <td> NaN</td>\n",
550 " <td> NaN</td>\n",
551 " </tr>\n",
552 " <tr>\n",
553 " <th>38</th>\n",
554 " <td> 2</td>\n",
555 " <td> NaN</td>\n",
556 " <td>NaN</td>\n",
557 " <td> NaN</td>\n",
558 " <td> NaN</td>\n",
559 " </tr>\n",
560 " <tr>\n",
561 " <th>39</th>\n",
562 " <td> 2</td>\n",
563 " <td> NaN</td>\n",
564 " <td>NaN</td>\n",
565 " <td> NaN</td>\n",
566 " <td> NaN</td>\n",
567 " </tr>\n",
568 " <tr>\n",
569 " <th>40</th>\n",
570 " <td> 2</td>\n",
571 " <td> NaN</td>\n",
572 " <td>NaN</td>\n",
573 " <td> NaN</td>\n",
574 " <td> NaN</td>\n",
575 " </tr>\n",
576 " <tr>\n",
577 " <th>41</th>\n",
578 " <td> 2</td>\n",
579 " <td> NaN</td>\n",
580 " <td>NaN</td>\n",
581 " <td> NaN</td>\n",
582 " <td> NaN</td>\n",
583 " </tr>\n",
584 " <tr>\n",
585 " <th>42</th>\n",
586 " <td> 2</td>\n",
587 " <td> NaN</td>\n",
588 " <td>NaN</td>\n",
589 " <td> NaN</td>\n",
590 " <td> NaN</td>\n",
591 " </tr>\n",
592 " <tr>\n",
593 " <th>43</th>\n",
594 " <td> 2</td>\n",
595 " <td> NaN</td>\n",
596 " <td>NaN</td>\n",
597 " <td> NaN</td>\n",
598 " <td> NaN</td>\n",
599 " </tr>\n",
600 " <tr>\n",
601 " <th>44</th>\n",
602 " <td> 2</td>\n",
603 " <td> NaN</td>\n",
604 " <td>NaN</td>\n",
605 " <td> NaN</td>\n",
606 " <td> NaN</td>\n",
607 " </tr>\n",
608 " <tr>\n",
609 " <th>45</th>\n",
610 " <td> 2</td>\n",
611 " <td> NaN</td>\n",
612 " <td>NaN</td>\n",
613 " <td> NaN</td>\n",
614 " <td> NaN</td>\n",
615 " </tr>\n",
616 " <tr>\n",
617 " <th>46</th>\n",
618 " <td> 2</td>\n",
619 " <td> NaN</td>\n",
620 " <td>NaN</td>\n",
621 " <td> NaN</td>\n",
622 " <td> NaN</td>\n",
623 " </tr>\n",
624 " <tr>\n",
625 " <th>47</th>\n",
626 " <td> 2</td>\n",
627 " <td> NaN</td>\n",
628 " <td>NaN</td>\n",
629 " <td> NaN</td>\n",
630 " <td> NaN</td>\n",
631 " </tr>\n",
632 " </tbody>\n",
633 "</table>\n",
634 "<p>96 rows × 5 columns</p>\n",
635 "</div>"
636 ],
637 "text/plain": [
638 " 0 -67 0 56 58\n",
639 "0 NaN -76 0 64 44\n",
640 "1 NaN -73 0 48 51\n",
641 "2 NaN -49 0 65 58\n",
642 "3 NaN -49 0 61 43\n",
643 "4 NaN -79 0 43 45\n",
644 "5 NaN -98 0 60 42\n",
645 "6 NaN -59 0 55 50\n",
646 "7 NaN -56 0 53 53\n",
647 "8 NaN -61 0 44 45\n",
648 "9 NaN -84 0 65 43\n",
649 "10 NaN -75 0 52 35\n",
650 "11 NaN -70 0 56 56\n",
651 "12 NaN 43 1 86 -61\n",
652 "13 NaN 15 1 93 -67\n",
653 "14 NaN 36 1 94 -59\n",
654 "15 NaN 62 1 92 -50\n",
655 "16 NaN 70 1 91 -78\n",
656 "17 NaN 47 1 87 -35\n",
657 "18 NaN 52 1 91 -56\n",
658 "19 NaN 46 1 81 -61\n",
659 "20 NaN 34 1 78 -83\n",
660 "21 NaN 45 1 87 -50\n",
661 "22 NaN 50 1 73 -67\n",
662 "23 NaN 45 1 97 -50\n",
663 "24 NaN 45 1 111 -61\n",
664 "25 NaN -92 2 23 -109\n",
665 "26 NaN -96 2 20 -94\n",
666 "27 NaN -88 2 26 -85\n",
667 "28 NaN -114 2 33 -90\n",
668 "29 NaN -106 2 9 -63\n",
669 ".. .. ... .. ... ...\n",
670 "18 3 NaN NaN NaN NaN\n",
671 "19 3 NaN NaN NaN NaN\n",
672 "20 3 NaN NaN NaN NaN\n",
673 "21 3 NaN NaN NaN NaN\n",
674 "22 3 NaN NaN NaN NaN\n",
675 "23 3 NaN NaN NaN NaN\n",
676 "24 3 NaN NaN NaN NaN\n",
677 "25 1 NaN NaN NaN NaN\n",
678 "26 1 NaN NaN NaN NaN\n",
679 "27 1 NaN NaN NaN NaN\n",
680 "28 1 NaN NaN NaN NaN\n",
681 "29 1 NaN NaN NaN NaN\n",
682 "30 1 NaN NaN NaN NaN\n",
683 "31 1 NaN NaN NaN NaN\n",
684 "32 1 NaN NaN NaN NaN\n",
685 "33 1 NaN NaN NaN NaN\n",
686 "34 1 NaN NaN NaN NaN\n",
687 "35 1 NaN NaN NaN NaN\n",
688 "36 1 NaN NaN NaN NaN\n",
689 "37 2 NaN NaN NaN NaN\n",
690 "38 2 NaN NaN NaN NaN\n",
691 "39 2 NaN NaN NaN NaN\n",
692 "40 2 NaN NaN NaN NaN\n",
693 "41 2 NaN NaN NaN NaN\n",
694 "42 2 NaN NaN NaN NaN\n",
695 "43 2 NaN NaN NaN NaN\n",
696 "44 2 NaN NaN NaN NaN\n",
697 "45 2 NaN NaN NaN NaN\n",
698 "46 2 NaN NaN NaN NaN\n",
699 "47 2 NaN NaN NaN NaN\n",
700 "\n",
701 "[96 rows x 5 columns]"
702 ]
703 },
704 "execution_count": 34,
705 "metadata": {},
706 "output_type": "execute_result"
707 }
708 ],
709 "source": [
710 "pandas.concat([data, pred], axis=0)"
711 ]
712 },
713 {
714 "cell_type": "code",
715 "execution_count": null,
716 "metadata": {
717 "collapsed": true
718 },
719 "outputs": [],
720 "source": []
721 }
722 ],
723 "metadata": {
724 "kernelspec": {
725 "display_name": "Python 2",
726 "language": "python",
727 "name": "python2"
728 },
729 "language_info": {
730 "codemirror_mode": {
731 "name": "ipython",
732 "version": 2
733 },
734 "file_extension": ".py",
735 "mimetype": "text/x-python",
736 "name": "python",
737 "nbconvert_exporter": "python",
738 "pygments_lexer": "ipython2",
739 "version": "2.7.10"
740 }
741 },
742 "nbformat": 4,
743 "nbformat_minor": 0
744 }