Q:

Remove occurrences in occur mode?

Is there a way to remove occurrences in Occur mode?
In particular, this piece of functionality would allow you to remove occurrences in case you are interested in editing only some out of all occurrences in Occur mode.
Example: say I have this piece of code:
import os
import time

print("Just an example")

john.age = 44
anna.age = 55
print("Something")
bob.age = 83

If I run occur searching for "age", I get:
3 matches for "age" in buffer: untitled
      6:john.age = 44
      7:anna.age = 55
      9:bob.age = 83

And after that I would like to have a function that allows me to, with the cursor in the desired line, remove that occurrence from the buffer so that any following edit will not have any effect into the removed occurrences.
In the given example, if I did not want to edit line 7, I could run the desired function to get the occur buffer in the following new state:
3 matches for "age" in buffer: untitled
      6:john.age = 44
      9:bob.age = 83

I know that it is possible to use Narrowing commands inside an occur buffer, but that would not cover the case where my lines of interest are scattered around other occurrences and it would also not be as simple as selecting the lines I do not want to mess with. Also, having this functionality would save time from having to write complex regular expressions even in the case where we could get the specific occurrences we are interested in from a single search.

A:

If you delete the entire line from the occur buffer, it will not touch the original buffer.
So press e to run #'occur-edit-mode, then delete the entire line (C-k).

A:

An occur buffer is just a buffer in read-only mode, that doesn't mean that it cannot be manipulated.
Something as straightforward like this can help you:
(defun occur-kill-line()
  "Quick and dirty discard line from occur resultset.
from https://emacs.stackexchange.com/a/52865/13589"
  (interactive)
  (let ((inhibit-read-only t))
    (kill-whole-line)
    (delete-blank-lines)))

invoking this function will kill the current line in occur buffer. Pressing g will revert the buffer. 
Adding this:
(define-key occur-mode-map (kbd "k") 'occur-kill-line)

will bind k to occur-kill-line to occur-mode-map making it available as occur command just pressing k.

