diff --git a/README.md b/README.md index 63255b2..424e395 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/browsr/browsr.py b/browsr/browsr.py index 094969d..353a0b7 100644 --- a/browsr/browsr.py +++ b/browsr/browsr.py @@ -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) diff --git a/docs/index.md b/docs/index.md index db83b6f..2405cb9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 67b00c5..06783f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" ]