pandit ☸️ pandas utils
Pandas with some cool additional features
Installation and usage
pip install pandit
import pandas as pd, import pandit
# or
import pandit as pd
df=pd.read_tsv(path)
df.sieve(x=3).show()
#Pandas behaves normally otherwise
If credentials are needed:
import credentials # you manage that part
assert credentials.gsheet # credential dict in https://docs.gspread.org/en/latest/oauth2.html
assert credentials.dropbox
pd.credentials = credentials
sieve
df.sieve(column1=value1, columns2=value2)
# returns df rows where column equals value - if value is not a list, otherwise:
df.sieve(column3=[value1,value2])
# returns df rows where column is value1 or value2; use [[value1,value2]] to match lists
# It's like pd.query but with a pythonic syntax instead of the sql string.
show
df.show() # shows multiple rows column by column (one line per column) with nice formatting, one line per column
# ideal for inspecting NLP datasets
df.rshow(n) # random sample of size n (default is 20)
Also:
df.bold_max()
bold max float values df.bold_max().to_latex()
pd.read_tsv
read_csv with sep='\t' for lazy persons
pd.read_jsonl
pd.read
df.read_{extension} where extension is extracted from the input path (.csv = read_csv)
pd.read_wandb(project_name)
df.drop_constant_column
drop columns that are constant
df.to_dropbox(path, format=None, token=None,**kwargs)
Save dataframe to dropbox
df.to_sheets(id,sheet_name,credential=None, include_index=False)
Save dataframe to sheets
df.undersample(column='label',sampling_strategy='auto',random_state=None,replacement=False)
Metadata
Release files for pandit 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandit-0.0.10.tar.gz | 16.5 kB | Without provenance | Details for pandit-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandit-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for pandit-0.0.10-py3-none-any.whl |
Total release size: 33.2 kB
Release files / pandit-0.0.10.tar.gz
| Download URL | pandit-0.0.10.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ac53de4503c47f9ddc67db8d328bafad87b3ba497f092da9be2e82a6bc49d92
|
|
BLAKE2b-256 checksum How to use checksums |
cb747c4da0e177a37e78e9237881687a73b0d1d82d4c728bb674f3d7ba3e996c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / pandit-0.0.10-py3-none-any.whl
| Download URL | pandit-0.0.10-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
622f618cdf53620cd8d0acba74ededb0b65fccc5f9173c96a29972326a7743da
|
|
BLAKE2b-256 checksum How to use checksums |
30a4df3cecc47a7f1b66947eeec6a3521b17ee2ae69974c439ba11aa2b230961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for pandit 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.