MCPcopy Create free account
hub / github.com/datapane/datapane / load_file

Method load_file

python-client/src/datapane/common/datafiles.py:52–57  ·  view source on GitHub ↗
(fn: PathOrFile)

Source from the content-addressed store, hash-verified

50
51 @staticmethod
52 def load_file(fn: PathOrFile) -> pd.DataFrame:
53 df = pa.ipc.open_file(fn).read_pandas()
54 # NOTE - need to convert categories from object to string https://github.com/apache/arrow/issues/33070
55 obj_to_str(df)
56 str_to_arrow_str(df)
57 return df
58
59 @staticmethod
60 def save_file(fn: PathOrFile, df: pd.DataFrame):

Callers

nothing calls this directly

Calls 2

obj_to_strFunction · 0.85
str_to_arrow_strFunction · 0.85

Tested by

no test coverage detected