Introduction to Python packages – contrastive

To install the Python package called contrastive, we issue the following command after launching the Anaconda prompt:

pip install contrastive 

The following screenshot shows the top part of the installation:

Using the dir() and print() functions, we could find more information about a function embedded in the Python package:

from contrastive import cluster  
x=dir(cluster) 
print(x) 

The output is shown here:

Get Hands-On Data Science with Anaconda now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.