Importing Pandas and Checking Version

This thread covers the method or techniques through which you can import the library of Pandas and check its current installed version in your environment. Firstly, let’s cover what Pandas really is:

  1. A Python library that is widely used for data manipulation and analysis
  2. Provides data structures for efficiently storing and manipulating large data sets
  3. Provides the ability to clean, reshape and analyze data
  4. Easy to use and versatile, so it is popular among data scientists, analysts, and engineers

Now that you are a bit familiar with what Pandas is and what it can do, here are a few methods through which you can import and check its version:

1. Simple import and checking version using "__ version __" attribute:

Note: Without using an alias, you have to specify the full keyword of Pandas before methods and attributes.

2. Import using an alias and check version using "show_versions()":

This method helps to know the version of pandas and its dependencies.

3. Import using "from" keyword:

Note: You can use an attribute or method in Pandas without specifying the Pandas keyword if you use the “from” keyword.

4. Check the Pandas version using your command prompt:

pip show pandas