Issue
I am coding python jupyter on vs code. I am finding the way to find and replace in current selected code block
For example
bl[(bl.uom_pallet == 0) & (bl.UOM == 'BG')]['uom_pallet'] = bl[(bl.uom_pallet > 0) & (bl.UOM == 'BG')]['uom_pallet'].mean()
bl[(bl.uom_pallet == 0) & (bl.UOM == 'BO')]['uom_pallet'] = bl[(bl.uom_pallet > 0) & (bl.UOM == 'BO')]['uom_pallet'].mean()
bl[(bl.uom_pallet == 0) & (bl.UOM == 'BOX')]['uom_pallet'] = bl[(bl.uom_pallet > 0) & (bl.UOM == 'BOX')]['uom_pallet'].mean()
I would like to replace 'uom_pallet' to 'quantities' but typing ctrl+H will search for the whole document starting the first code block. Is there a way that I can find and replace on current selected code block? thank you for your help
Solution
Here is my suggestion:
Use the mouse to select the area you want to replace
Then use CTRL+F to find or CTRL+H to replace
Select Find in Selection on the Replacement panel
Enter
uom_pallet
in the input box above, Enterquantities
in the input box belowselect Replace All
Result after replacement:
Answered By - JialeDu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.