Skip to content

Commit

Permalink
✨ feather files
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin authored Jan 5, 2024
1 parent bbeb14c commit 54250a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
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

0 comments on commit 54250a9

Please sign in to comment.