Importing and viewing data from the XY table and iCub palm.

Created by Mathew H. Evans. 16.06.14


In [2]:
# - - - - - - IMPORT LIBRARIES   
%matplotlib inline
print "importing libraries"
import pandas as pd #for dealing with csv import
import numpy as np #arrays and other matlab like manipulation
import os # for joining paths and filenames sensibly
import matplotlib.pyplot as plt  # Matplotlib's pyplot: MATLAB-like syntax
import scipy.stats.mstats as ssm #for bootstrap
from scipy.stats import gaussian_kde as kde
import random
#import mpld3

#mpld3.enable_notebook()


importing libraries

In [3]:
# must specify that blank space " " is NaN
df = pd.read_csv("data_0.txt", sep='\t ')

In [8]:
print df


    0.000000  0.000000.1  0.000000.2  0.000000.3  0.027161  0.000000.4  \
0          0           0           0    0.000000  0.027052    0.000000   
1          0           0           0    0.000000  0.026944    0.000000   
2          0           0           0    0.000000  0.026836    0.001933   
3          0           0           0    0.000000  0.026729    0.000000   
4          0           0           0    0.000000  0.026622    0.000000   
5          0           0           0    0.000000  0.026515    0.000000   
6          0           0           0    0.000000  0.026409    0.000000   
7          0           0           0    0.000000  0.026304    0.032009   
8          0           0           0    0.000000  0.026198    0.145155   
9          0           0           0    0.000000  0.026094    0.201211   
10         0           0           0    0.000000  0.025989    0.228725   
11         0           0           0    0.000000  0.025885    0.241969   
12         0           0           0    0.000000  0.025782    0.248081   
13         0           0           0    0.000000  0.025679    0.250628   
14         0           0           0    0.000000  0.025576    0.251396   
15         0           0           0    0.296413  0.025474    0.000000   
16         0           0           0    0.545227  0.025372    0.000000   
17         0           0           0    0.168047  0.025270    0.000000   
18         0           0           0    0.000000  0.025169    0.068014   
19         0           0           0    0.000000  0.000000    0.000000   
20         0           0           0    0.000000  0.000000    0.000000   
21         0           0           0    0.000000  0.000000    0.000000   
22         0           0           0    0.000000  0.000000    0.060199   
23         0           0           0    0.000000  0.000000    0.159571   
24         0           0           0    0.000000  0.000000    0.208740   
25         0           0           0    0.000000  0.008735    0.232808   
26         0           0           0    0.000000  0.020419    0.244328   
27         0           0           0    0.000000  0.026197    0.249577   
28         0           0           0    0.000000  0.029021    0.251691   
29         0           0           0    0.000000  0.030370    0.252241   
30         0           0           0    0.000000  0.030981    0.000000   
31         0           0           0    0.000000  0.031223    0.000000   
32         0           0           0    0.000000  0.031282    0.000000   
33         0           0           0    0.000000  0.031248    0.000000   
34         0           0           0    0.000000  0.031169    0.000000   
35         0           0           0    0.000000  0.031067    0.000000   
36         0           0           0    0.000000  0.030954    0.022476   
37         0           0           0    0.000000  0.030836    0.000000   
38         0           0           0    0.000000  0.030716    0.000000   
39         0           0           0    0.000000  0.030594    0.000000   
40         0           0           0    0.000000  0.030473    0.066101   
41         0           0           0    0.000000  0.000000    0.167155   
42         0           0           0    0.000000  0.000000    0.217146   
43         0           0           0    0.000000  0.000000    0.241607   
44         0           0           0    0.311559  0.000000    0.253306   
45         0           0           0    0.560313  0.000000    0.258625   
46         0           0           0    0.183072  0.000000    0.000000   
47         0           0           0    0.000000  0.000000    0.000000   
48         0           0           0    0.401110  0.013757    0.000000   
49         0           0           0    0.602630  0.027374    0.000000   
50         0           0           0    0.201782  0.034100    0.000000   
51         0           0           0    0.001757  0.037382    0.038251   
52         0           0           0    0.000000  0.038941    0.155335   
53         0           0           0    0.000000  0.039640    0.000000   
54         0           0           0    0.000000  0.039909    0.000000   
55         0           0           0    0.316649  0.039963    0.000000   
56         0           0           0    0.559157  0.039909    0.080753   
57         0           0           0    0.178807  0.000000    0.177844   
58         0           0           0    0.000000  0.000000    0.000000   
59         0           0           0    0.000000  0.000000    0.000000   
         ...         ...         ...         ...       ...         ...   

    0.000000.5  0.000000.6  0.000000.7  0.000000.8  0.000000.9  0.000000.10  \
0            0    0.000000           0           0           0            0   
1            0    0.000000           0           0           0            0   
2            0    0.000000           0           0           0            0   
3            0    0.000000           0           0           0            0   
4            0    0.000000           0           0           0            0   
5            0    0.000000           0           0           0            0   
6            0    0.000000           0           0           0            0   
7            0    0.000000           0           0           0            0   
8            0    0.000000           0           0           0            0   
9            0    0.000000           0           0           0            0   
10           0    0.000000           0           0           0            0   
11           0    0.000000           0           0           0            0   
12           0    0.432908           0           0           0            0   
13           0    0.681176           0           0           0            0   
14           0    0.803452           0           0           0            0   
15           0    0.862738           0           0           0            0   
16           0    0.890537           0           0           0            0   
17           0    0.402600           0           0           0            0   
18           0    0.158802           0           0           0            0   
19           0    0.037073           0           0           0            0   
20           0    0.000000           0           0           0            0   
21           0    0.000000           0           0           0            0   
22           0    0.000000           0           0           0            0   
23           0    0.000000           0           0           0            0   
24           0    0.000000           0           0           0            0   
25           0    0.000000           0           0           0            0   
26           0    0.000000           0           0           0            0   
27           0    0.000000           0           0           0            0   
28           0    0.000000           0           0           0            0   
29           0    0.000000           0           0           0            0   
30           0    0.000000           0           0           0            0   
31           0    0.000000           0           0           0            0   
32           0    0.000000           0           0           0            0   
33           0    0.000000           0           0           0            0   
34           0    0.000000           0           0           0            0   
35           0    0.000000           0           0           0            0   
36           0    0.000000           0           0           0            0   
37           0    0.000000           0           0           0            0   
38           0    0.000000           0           0           0            0   
39           0    0.000000           0           0           0            0   
40           0    0.000000           0           0           0            0   
41           0    0.000000           0           0           0            0   
42           0    0.000000           0           0           0            0   
43           0    0.000000           0           0           0            0   
44           0    0.000000           0           0           0            0   
45           0    0.000000           0           0           0            0   
46           0    0.000000           0           0           0            0   
47           0    0.000000           0           0           0            0   
48           0    0.000000           0           0           0            0   
49           0    0.000000           0           0           0            0   
50           0    0.000000           0           0           0            0   
51           0    0.000000           0           0           0            0   
52           0    0.000000           0           0           0            0   
53           0    0.000000           0           0           0            0   
54           0    0.000000           0           0           0            0   
55           0    0.000000           0           0           0            0   
56           0    0.000000           0           0           0            0   
57           0    0.000000           0           0           0            0   
58           0    0.000000           0           0           0            0   
59           0    0.000000           0           0           0            0   
           ...         ...         ...         ...         ...          ...   

    1.169171  0.089803  0.000000.11  0.598481  0.204581  0.000000.12  \
0   1.372707  0.092379     0.000000  0.173474  0.634493     0.000000   
1   0.000000  0.093477     0.000000  0.000000  0.848174     0.000000   
2   0.000000  0.093837     0.000000  0.000000  0.953744     0.000000   
3   0.000000  0.093829     0.000000  0.000000  1.005260     0.000000   
4   0.000000  0.093637     0.000000  0.000000  1.029753     0.000000   
5   0.000000  0.093354     0.000000  0.000000  1.040738     0.000000   
6   0.000000  0.093027     0.000000  0.260111  0.044971     0.000000   
7   0.000000  0.092677     0.000000  0.505768  0.000000     0.174606   
8   0.000000  0.092318     0.000000  0.000000  0.300989     0.000000   
9   0.000000  0.091955     0.000000  0.000000  0.676109     0.000000   
10  0.083627  0.091590     0.961735  0.000000  1.362411     0.000000   
11  0.334027  0.091225     1.459067  0.000000  1.703109     0.000000   
12  0.958565  0.090861     0.705019  0.000000  1.371011     0.268511   
13  1.269043  0.090497     0.328063  0.000000  1.203719     0.801723   
14  1.422494  0.090136     0.139653  0.000000  1.118832     1.067179   
15  0.497435  0.089775     0.045515  0.214072  0.075151     0.698759   
16  0.035390  0.089416     0.000000  0.491041  0.000000     0.514264   
17  0.304851  0.000000     0.000000  0.627990  0.000000     0.000000   
18  0.438931  0.000000     0.000000  0.694934  0.000000     0.000000   
19  0.005322  0.000000     0.000000  0.726883  0.000000     0.000000   
20  0.000000  0.000000     0.000000  0.741339  0.005816     0.000000   
21  0.181327  0.000000     0.000000  0.747056  0.000000     0.000000   
22  0.376839  0.008626     0.000000  0.748409  0.000000     0.057897   
23  0.473948  0.055467     0.000000  0.747586  0.000000     0.196990   
24  0.021856  0.078682     0.000000  0.245681  0.000000     0.266247   
25  0.000000  0.090086     0.000000  0.000000  0.000000     0.300586   
26  0.184003  0.095585     0.000000  0.870531  0.000000     0.000000   
27  0.377209  0.098133     0.000000  1.304684  0.000000     0.000000   
28  0.973167  0.099205     0.000000  0.518284  0.053328     0.000000   
29  1.269369  0.099541     0.000000  0.125619  0.551306     0.000000   
30  0.415699  0.099509     0.000000  0.429821  0.299039     0.000000   
31  0.000000  0.099294     0.000000  0.580454  0.172849     0.000000   
32  0.000000  0.098988     0.000000  0.654309  0.000000     0.000000   
33  0.000000  0.098638     0.000000  0.689779  0.000000     0.000000   
34  0.000000  0.098266     0.000000  0.706064  0.000000     0.106344   
35  0.000000  0.097885     0.000000  1.212762  0.000000     0.226312   
36  0.000000  0.097499     0.000000  1.462672  0.000000     0.285998   
37  0.000000  0.097112     0.000000  0.584202  0.000000     0.815543   
38  0.137295  0.096725     0.000000  0.145555  0.000000     1.079156   
39  0.000000  0.096339     0.000000  0.000000  0.000000     1.209806   
40  0.000000  0.095954     0.000000  0.000000  0.000000     1.273976   
41  0.000000  0.095570     0.000000  0.000000  0.000000     0.304908   
42  0.000000  0.095188     0.000000  0.304868  0.000000     0.000000   
43  0.000000  0.094807     0.000000  0.508764  0.000000     0.000000   
44  0.000000  0.094428     0.000000  0.000000  0.078531     0.000000   
45  0.000000  0.094050     0.000000  0.000000  0.572414     0.149043   
46  0.071573  0.093674     0.000000  0.441119  0.000000     0.743571   
47  0.326166  0.093299     0.000000  1.077175  0.000000     1.039682   
48  0.000000  0.000000     0.000000  0.391776  0.000000     0.186587   
49  0.000000  0.000000     0.000000  0.049664  0.000000     0.000000   
50  0.000000  0.000000     0.000000  0.379192  0.000000     0.000000   
51  0.000000  0.000000     0.000000  0.542539  0.000000     0.000000   
52  0.000000  0.000000     0.000000  0.622801  0.000000     0.000000   
53  0.000000  0.012417     0.000000  0.661526  0.000000     0.000000   
54  0.000000  0.059242     0.000000  0.679488  0.000000     0.000000   
55  0.088045  0.082443     0.000000  0.687074  0.000000     0.000000   
56  0.336390  0.093832     0.000000  0.689477  0.000000     0.093963   
57  0.000000  0.099316     0.000000  0.689296  0.000000     0.000000   
58  0.023260  0.101848     0.000000  0.000000  0.000000     0.000000   
59  0.304275  0.102906     0.000000  0.000000  0.000000     0.061370   
         ...       ...          ...       ...       ...          ...   

    0.000000.13  0.249450      
0             0  0.627425 ...  
1             0  0.000000 ...  
2             0  0.000000 ...  
3             0  0.000000 ...  
4             0  0.000000 ...  
5             0  0.000000 ...  
6             0  0.000000 ...  
7             0  0.000000 ...  
8             0  0.000000 ...  
9             0  0.000000 ...  
10            0  0.000000 ...  
11            0  0.000000 ...  
12            0  1.005328 ...  
13            0  1.507133 ...  
14            0  1.756133 ...  
15            0  1.378735 ...  
16            0  1.189088 ...  
17            0  0.093318 ...  
18            0  0.000000 ...  
19            0  0.000000 ...  
20            0  0.000000 ...  
21            0  0.000000 ...  
22            0  0.000000 ...  
23            0  0.000000 ...  
24            0  0.000000 ...  
25            0  0.000000 ...  
26            0  0.000000 ...  
27            0  0.000000 ...  
28            0  0.000000 ...  
29            0  0.000000 ...  
30            0  0.000000 ...  
31            0  0.000000 ...  
32            0  0.000000 ...  
33            0  0.000000 ...  
34            0  0.000000 ...  
35            0  0.000000 ...  
36            0  0.000000 ...  
37            0  0.000000 ...  
38            0  0.000000 ...  
39            0  0.000000 ...  
40            0  0.000000 ...  
41            0  0.000000 ...  
42            0  0.000000 ...  
43            0  0.000000 ...  
44            0  0.464647 ...  
45            0  0.744957 ...  
46            0  0.000000 ...  
47            0  0.000000 ...  
48            0  0.240839 ...  
49            0  0.632958 ...  
50            0  0.328046 ...  
51            0  0.175569 ...  
52            0  0.099308 ...  
53            0  0.061156 ...  
54            0  0.042058 ...  
55            0  0.000000 ...  
56            0  0.000000 ...  
57            0  0.152620 ...  
58            0  0.000000 ...  
59            0  0.000000 ...  
            ...       ...      

[712836 rows x 48 columns]

In [9]:
import numpy as np

In [ ]: