Locate data point(s) in python dataframe

157 views Asked by At

I have a graph (please see the attached pict) plotted from a data frame (tsv) that looks like this.

Graph Current vs Z

Time (s)   Current      Current1        X         Y         Line                                                              
0.000000  -5.429863e-08  6.707978e-12  2.750966  6.000009   1.0 -31.771946   
0.001032  -5.352960e-08  7.718102e-11  2.750966  6.000009   1.0 -36.043933   
0.002064  -5.410637e-08  8.166567e-11  2.750966  5.999665   1.0 -40.368444   
0.003096  -5.359368e-08  1.034482e-10  2.750966  5.999665   1.0 -44.803840   
0.004128  -5.740678e-08  1.281138e-10  2.750966  5.999322   1.0 -49.361793   
...                 ...           ...       ...       ...   ...        ...   
56.740393 -5.856032e-08  2.812325e-10  2.750966  5.999665   3.0   6.757639   
56.741425 -5.378594e-08  2.860375e-10  2.750966  5.999665   3.0   2.508996   
56.742457 -5.215176e-08  2.748259e-10  2.750966  5.999665   3.0  -1.762991   
56.743489 -5.266444e-08  2.745055e-10  2.750966  5.999322   3.0  -6.064157   
56.744521 -5.253627e-08  2.857171e-10  2.750616  5.999322   3.0 -10.458701   

           FeedbackType        V2        dt     Amplitude        V1         Z  
Time (s)                                                                       
0.000000            0.0  0.600005  0.001033  1.255979e-09  0.199882  0.476397  
0.001032            0.0  0.600005  0.001032  1.217920e-09  0.199882  0.479176  
0.002064            0.0  0.600005  0.001032  1.173518e-09  0.199882  0.482302  
0.003096            0.0  0.600005  0.001032  1.132287e-09  0.199882  0.485775  
0.004128            0.0  0.600005  0.001032  1.102383e-09  0.199882  0.489248  
...                 ...       ...       ...           ...       ...       ...  
56.740393           8.0  0.600005  0.001032  1.271384e-09  0.199882  8.841045  
56.741425           8.0  0.600005  0.001032  1.247824e-09  0.199882  8.841740  
56.742457           8.0  0.600005  0.001032  1.213842e-09  0.199882  8.842782  
56.743489           8.0  0.600005  0.001032  1.169893e-09  0.199882  8.843824  
56.744521           8.0  0.600005  0.001032  1.125944e-09  0.199882  8.845213  

[54986 rows x 12 columns]

The graph was plotted by limiting x and y value.

plt.xlim (8.50, 8.522)
plt.ylim (-0.05e-8, 0.73e-8)

I would like to know is there any way to figure out the location of the data points used in the graph? (For example, I want to know in which row that Z value of 8.513517 is located). Should I add index number and locate the data point manually?

Thanks.

0

There are 0 answers