Tools for converting network data to pajek files
Project description
Pajek Tools
Tools for converting network data to pajek files.
Pajek is a file format for networks, typically stored in files with a .net extension. It is used as input for software such as Infomap.
Installation
Install from PyPI:
pip install pajek-tools
Usage
Use the PajekWriter object to convert a network from an edgelist in pandas DataFrame form, to a Pajek .net file:
from pajek_tools import PajekWriter writer = PajekWriter(dataframe) writer.write("output.net")
Example
from pajek_tools import PajekWriter import pandas as pd df = pd.DataFrame([["a", "b"], ["a", "c"], ["c", "a"], ["c", "d"]], columns=["source", "target"]) writer = PajekWriter(df, directed=True, citing_colname="source", cited_colname="target") writer.write("output.net")
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-02-12)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pajek_tools-0.1.4.tar.gz
(14.0 kB
view hashes)
Built Distribution
Close
Hashes for pajek_tools-0.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8466df050db324c93c0cf0932c5e054ba6182f9d38f0d86774ffa7586a8bb3 |
|
MD5 | de0725b616657410ab7247a102ef0c73 |
|
BLAKE2b-256 | e364218263441f134e7bbf95f0eccb88b55fdbe05182d43d92d2c18b225ca977 |