There are multiple ways to call a module in python.
Check the difference between them.
Load module A. Load all classes and functions defined in A.
Example
import datetime
(Load the datetime module)
--A "file" that contains python definitions and sentences. --Various functions (tools) are described in the file. --You can enter function definitions and execution statements. --You can import other modules within a module
Example
import pandas as pd
(Import pandas as pd)
■ For import pandas only df = pandas.DataFrame()
■ For import pandas ** as pd ** df = pd.DataFrame()
Example
from selenium import webdriver
(selenium webdriver)
Load a tool called webdriver in the selenium file.
(1) Module: A .py file. ② Package: This is also a .py file. A collection of multiple modules ③ Library: Modules and packages. The definition is ambiguous. └ A file with many useful functions such as jQuery library
Reference site (Difference in language, how to make a package)
Recommended Posts