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 details)
Built Distribution
File details
Details for the file pajek_tools-0.1.4.tar.gz
.
File metadata
- Download URL: pajek_tools-0.1.4.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf646a865159ccdd5fa8eee557740dd058a186406b2c7a7a5e009f1f4ba510d7 |
|
MD5 | 19b8311ce651f44660f190bc5e031a68 |
|
BLAKE2b-256 | 8e9ff49740a7f97e22cd4b1f1eab969538a8bc514bc6683d06f239b52c865953 |
File details
Details for the file pajek_tools-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: pajek_tools-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8466df050db324c93c0cf0932c5e054ba6182f9d38f0d86774ffa7586a8bb3 |
|
MD5 | de0725b616657410ab7247a102ef0c73 |
|
BLAKE2b-256 | e364218263441f134e7bbf95f0eccb88b55fdbe05182d43d92d2c18b225ca977 |