Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feather files #35

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pipx install browsr
### Extra Installation

If you're looking to use **`browsr`** on remote file systems, like GitHub or AWS S3, you'll need to install the `remote` extra.
If you'd like to browse parquet files, you'll need to install the `parquet` extra. Or, even simpler,
If you'd like to browse parquet / feather files, you'll need to install the `data` extra. Or, even simpler,
you can install the `all` extra to get all the extras.

```shell
Expand Down
3 changes: 3 additions & 0 deletions browsr/browsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def render_document(
elif document.suffix == ".parquet":
df = pd.read_parquet(document)[:1000]
return self.df_to_table(pandas_dataframe=df, table=self.table_view)
elif document.suffix.lower() in [".feather", ".fea"]:
df = pd.read_feather(document)[:1000]
return self.df_to_table(pandas_dataframe=df, table=self.table_view)
elif document.suffix.lower() in image_file_extensions:
screen_width = self.app.size.width / 4
content = open_image(document=document, screen_width=screen_width)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pipx install browsr
### Extra Installation

If you're looking to use **`browsr`** on remote file systems, like GitHub or AWS S3, you'll need to install the `remote` extra.
If you'd like to browse parquet files, you'll need to install the `parquet` extra. Or, even simpler,
If you'd like to browse parquet / feather files, you'll need to install the `data` extra. Or, even simpler,
you can install the `all` extra to get all the extras.

```shell
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ all = [
"pyarrow~=10.0.0",
"textual-universal-directorytree[remote]~=1.0.2"
]
data = [
"pyarrow~=10.0.0"
]
parquet = [
"pyarrow~=10.0.0"
]
Expand Down