Skip to content
Loading
In pandas, How do I return a row that comes after the row which meets
  • idk it's not working for me.I have a numpy array with the row numbers I want to display. Do you know how to do that? maybe it's easier.

    array([  42,  163,  187,  189,  596,  606,  714,  819,  921,  924,  956,
           1005, 1157, 1288, 1361, 1379, 1570, 1859, 1972, 2147, 2151, 2189,
           2287, 2375, 2410, 2464, 2614, 2800, 2843, 2867, 2878, 3036, 3087,
           3142, 3148, 3151, 3155, 3156, 3319, 3320, 3353, 3399, 3400])
    
    

    This is the array and in the original dataframe there is a column ['row'] with an integer value

    0
  • Rajanikant Hawaldar
    Indexing? Like
    1. if i == 0  
    2.      return i +1  
     
    0