Exemple #1
0
    def download_df(self) -> pd.DataFrame:
        """
        Download the blob and return it as a Dataframe

        Returns:
            A pandas dataframe generated from the blob
        """
        with DPTmpFile(ArrowFormat.ext) as fn:
            do_download_file(self.data_url, fn.name)
            return ArrowFormat.load_file(fn.name)
Exemple #2
0
def save_load_arrow(tmp_path: Path, df: pd.DataFrame) -> pd.DataFrame:
    """Roundtrip via an arrow file"""
    fn = mktemp(".arrow", dir=tmp_path)
    ArrowFormat.save_file(str(fn), df.copy(deep=True))
    return ArrowFormat.load_file(fn)