if i am right: File | Settings | project structure and select the folders you need and click exlcuded.
from documentation
Mark a folder as an excluded root.
Excluded roots are not visible to PyCharm. Usually, one would like to exclude temporary >build folders, generated output, logs, and other project output. Excluding the unnecessary >paths is a good way to significantly improve performance.
This command is duplicated on the context menu of a content root.