MNE-Python does not support removing segments from raw (continuous) data, which is what you were trying to do. In order to use the drop_bad() method, you need to epoch your data first. Once you have an Epochs object, you can drop epochs containing artifacts with the code you mentioned.
I see that I can’t reject remobe without epoching.
I don’t think I would create an epoch if I want to see changes in brain activity as a whole.
How can I do that in that case?
It depends a bit on the types of artifacts you want to remove and on the subsequent processing you are planning to do. For example, you can remove eye artifacts with ICA without the need for epoching (Repairing artifacts with ICA — MNE 1.5.1 documentation).