The general process of moving data from an external source into one's platform, program, or data set.
Used as a general term to mean "bringing data from outside, in." It often involves modifying, converting, or truncating data to fit within the constraints of the system into which it is being moved, to translate the format of the current data into one which is more easily used by the target system, or to cut a large data set down to only data that is relevant to the person performing the import process.
In Python, the import
statement is used to access objects defined in the standard library, as well as external modules and packages. Python imports are actual statements that are executed in runtime. It is possible to import a specific part of the module by using from <module> import <specific_part>
. It is also possible to rename the imported object by using as
.
In Java, the import
statement is used to import class names from another package. In recent versions of the language, the static import
statement is used to import names of static members of a specific class; i.e. static
fields or methods. Unlike Python, Java imports are processed at compile time, being actually syntactic sugar (so one does not need to specify fully qualified names throughout the code).