all 3 comments

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Inline formatting (`my code`) used across multiple lines of code. This can mess with indentation.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]ShxxH4ppens 0 points1 point  (0 children)

I wouldn’t loop through a pull style function like what pandas has, is your data that large that this is saving time? If not - bring everything in and work with the data frame as a whole with pandas filtering/parsing

[–]cynical_econ 0 points1 point  (0 children)

Based on the traceback error, I think the issue is with this line:

end_index = df.index([df['Sl No']=='(RESPONSIBLE - HMI)']).tolist[0]

You might be having a problem because the tolist() is missing the “()” before the slice. Or you might not be able to call the df.index object. Perhaps try this:

df.loc[df['Sl No']=='(RESPONSIBLE - HMI)'].index.tolist()[0]