Pandas is typically imported using the alias pd
.
An alias in Python is an alternative name used to refer to the same object or entity. |
You can create an alias by using the as
keyword during the import process.
import pandas as pd |
Now, the Pandas package can be referenced as pd
instead of pandas
.
import pandas as pd mydataset = { ‘cars’: [“BMW”, “Volvo”, “Ford”], ‘passings’: [3, 7, 2] } myvar = pd.DataFrame(mydataset) print(myvar) |
The version number is stored in the __version__
attribute.
import pandas as pd print(pd.__version__) |