def dx_csv_to_data_frame()

in subscribers/python/pandas-describe-csv/pandas-describe-csv.py [0:0]


def dx_csv_to_data_frame(asset):
    with TemporaryS3Bucket() as bucket:
        export_asset(asset, bucket)
        with tempfile.TemporaryDirectory() as temp_dir:
            asset_id = asset.get('Id')
            dest = os.path.join(temp_dir, asset_id)
            s3.download_file(bucket, asset_id, dest)

            return pandas.read_csv(dest)