Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Rearrange data from a normalized CSV format to a crosstabulated format, with styling.
crosstab is a Python package that rearranges data from a normalized CSV format to a crosstabulated format, with styling.
Go from this:
To this:
You can install crosstab via pip from PyPI:
pip install crosstab
There is also a Docker image available on the GitHub Container Registry:
docker pull ghcr.io/geocoug/crosstab:latest
The following examples demonstrate how to use crosstab to crosstabulate a CSV file. By default, the output is an Excel file with two sheets: one that contains metadata about the crosstabulation (ie. who ran the script, when it was run, etc.) and another with the data crosstabulated. If the keep_sqlite
parameter is set to True
, the SQLite database used to store the source data is kept. The SQLite file will have the same basename as the output Excel file, but with a .sqlite
extension. If the keep_src
parameter is set to True
, the source CSV data is copied to the Excel file as a third sheet.
Each of the examples below will produce the exact same output.
from pathlib import Path
from crosstab import Crosstab
Crosstab(
incsv=Path("data.csv"),
outxlsx=Path("crosstabbed_data.xlsx"),
row_headers=("location", "sample"),
col_headers=("cas_rn", "parameter"),
value_cols=("concentration", "units"),
keep_sqlite=True,
keep_src=True,
).crosstab()
crosstab -k -s -f data.csv -o crosstabbed_data.xlsx -r location sample -c cas_rn parameter -v concentration units
docker run --rm -v $(pwd):/data ghcr.io/geocoug/crosstab:latest -k -s -f /data/data.csv -o /data/crosstabbed_data.xlsx -r location sample -c cas_rn parameter -v concentration units
FAQs
Rearrange data from a normalized CSV format to a crosstabulated format, with styling.
We found that crosstab demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.