You can customize the structure of import statements in your code. Imports can be placed separately, grouped by source, or left unstructured.
To make your choice, go to Settings/Preferences (&shortcut:ShowSettings;, select Editor | Code style | Python, and select the corresponding checkbox under Structure of "from" imports.