Skip to content
crunchdaoPublic

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

91 Commits

Folders and files

Repository files navigation

Quickly read and write file based on their extension.

PyTest

Install

python3 -m pip install --upgrade readwrite

CLI Usage

readf [FILE-PATHS...]

or

readfile <EXTENSION> [EXTENSION-SPECIFIC-OPTIONS] [FILE-PATHS...]

Code Usage

import readwrite as rw

# will use pandas.read_csv(...)
df = rw.read("data.csv")

# will use pandas.to_parquet(...)
rw.write(df, "data.parquet")

Supported Extensions

Handler Extensions Backend Read Write
Binary bin Python's bytes ✔️ ✔️
Csv csv pandas ✔️ ✔️
Excel xlsx pandas ✔️ ✔️
H5ad h5ad scanpy ✔️ ❌
Joblib joblib joblib ✔️ ✔️
Json json Python's json ✔️ ✔️
Parquet parquet pandas ✔️ ✔️
Pickle pkl, pickle Python's pickle or pandas ✔️ ✔️
Toml toml toml ✔️ ✔️
Tar tar Python's tarfile ✔️ ❌
Text txt Python's str ✔️ ✔️
Yaml yml, yaml PyYAML ✔️ ✔️
Zarr zarr SpatialData ✔️ ❌
Zip zip Python's zipfile ✔️ ❌

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages