Skip to content

Commit 6775444

Browse files
committed
fix: support reading type arrow
1 parent 20bd962 commit 6775444

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pins/drivers.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ def load_data(
7676

7777
return pd.read_csv(fs.open(path_to_file))
7878

79+
elif meta.type == "arrow":
80+
import pandas as pd
81+
82+
return pd.read_feather(fs.open(path_to_file))
83+
7984
elif meta.type == "feather":
8085
import pandas as pd
8186

@@ -123,6 +128,14 @@ def save_data(
123128

124129
obj.to_csv(final_name, index=False)
125130

131+
elif type == "arrow":
132+
# NOTE: R pins accepts the type arrow, and saves it as feather.
133+
# we allow reading this type, but raise an error for writing.
134+
raise NotImplementedError(
135+
"Writing pin type 'arrow' is unsupported. "
136+
"Use 'feather' or 'parquet' instead."
137+
)
138+
126139
elif type == "feather":
127140
_assert_is_pandas_df(obj)
128141

0 commit comments

Comments
 (0)