The only difference between these is that the second one changes the name you can access attributes under.
Both run the top-level code in the module if any (assuming it was the first time the module was imported in the program).
It first imports the package “seaborn” and then imports the sub-module “objects” from that and assigns the imported module object to the name so.
There is indeed a hierarchical relationship which is typically that seaborn is a folder with an __init__.py file alongside an “objects.py” file in this case.
Typically you need to import the sub-module explicitly as well but he package “seaborn” may have code that does it automatically for you if its always needed.
It may do so if the package is coded that way (and should typically be documented as such in that case). But if you don’t know you should do the imports explicitly before trying to use the submodules. Python will cache the result of an import anyway.
This is indeed more or less equivalent to
import foo.barfollowes by bar = foo.bar with the difference that you won’t also have foodefined in the global namespace in the former case.