By using this site, you acknowledge that you have read and understand our Cookie policy, Privacy policy and Terms .
access_time 8 months ago visibility31 comment 0 languageEnglish

Different programming languages have different package management tools.

For Python, pip is the package installer. pip package itself can also be used to list all the installed packages in the system. However that doesn't work anymore in the latest versions. You can use pkg_resources package to get the same information. You can also use help function to list all the installed modules.

help('modules')

Code snippet

import pkg_resources
for d in pkg_resources.working_set:
    print(d.project_name, d.version)
info Last modified by Raymond at 8 months ago * This page is subject to Site terms.

More from Kontext

PySpark Read Multiple Lines Records from CSV

local_offer pyspark local_offer spark-2-x local_offer python

visibility 6
thumb_up 0
access_time 1 day ago

CSV is a common format used when extracting and exchanging data between systems and platforms. Once CSV file is ingested into HDFS, you can easily read them as DataFrame in Spark. However there are a few options you need to pay attention to especially if you source file: Has records ac...

open_in_new View

local_offer python local_offer SQL Server

visibility 132
thumb_up 0
access_time 2 months ago

Python JayDeBeApi module allows you to connect from Python to databases using Java JDBC drivers.

open_in_new View

local_offer pyspark local_offer spark-2-x local_offer python

visibility 596
thumb_up 0
access_time 3 months ago

This articles show you how to convert a Python dictionary list to a Spark DataFrame. The code snippets runs on Spark 2.x environments. Input The input data (dictionary list looks like the following): data = [{"Category": 'Category A', 'ItemID': 1, 'Amount': 12.40}, ...

open_in_new View

local_offer python local_offer pandas

visibility 22
thumb_up 0
access_time 4 months ago

Pickle files are commonly used Python data related projects. This article shows how to create and load pickle files using Pandas.  Create pickle file import pandas as pd import numpy as np file_name="data/test.pkl" data = np.random.randn(1000, 2) # pd.set_option('displ...

open_in_new View

info About author

Kontext Column

Kontext Column

Created for everyone to publish data, programming and cloud related articles. Follow three steps to create your columns.

Learn more arrow_forward
info Follow us on Twitter to get the latest article updates. Follow us