I was looking at the pandas source code here, and I found the following statement a little bit weird:
from pandas._libs import NaT, groupby as libgroupby, iNaT, lib, reduction
It seems that it imported Nat and groupby, which are two libraries, as multiple modules (libgroupby, iNaT, lib, reduction).
I went to the
pandas._libslibrary here, but I didn't find any model with nameNaT. There is indeed agroupby.pyx, which I assume is thegroupbylibrary?Can the number of imported libraries be less than the imported modules? How does that work? From my past understanding, we can do
import a as b, but we cannot doimport a as b, c.