Python Forum

Full Version: Remove Rows based on condition
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I am totally new to python and not sure this is the correct place to ask a question.
I want to remove receipts which have opposite values (Y vs N,1 vs -1 etc.).if each receipt's row has opposite row. I.e. if also will be row 500.2 (with any content) - receipt 500 will not be removed.
Does any suggest me the best way to do with python script? I am a power bi developer and power bi accept python script.
Please see below link for data set and expected result.

<a href="http://tinypic.com?ref=2w1w9d4" target="_blank"><img src="http://i67.tinypic.com/2w1w9d4.png" border="0" alt="Image and video hosting by TinyPic"></a>

[Image: 2w1w9d4.png]
for your post, you need to provide:
  • What you have tried so far (show best attempt code)
  • where the data is coming from, and how it's being displayed
  • Your operating system, python version and what packages are being used.
  • Anything else needed to duplicate starting point