Skip to content

Commit

Permalink
add utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Geng committed May 29, 2024
1 parent 25783a3 commit 9efa96f
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions benchmarks/utils.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
import errno
import os
import re
import tempfile
import typing

import pandas as pd
import pyarrow as pa
import pyarrow.csv as csv
import pyarrow.parquet as parquet
import polars as pl
from pprint import pprint as pr

import audbackend
import audeer
import collections

import polars as pl
import pyarrow as pa

from audb.core import define


polars_mappings = pl.datatypes.convert._DataTypeMappings()
pl2arrow_mappings = polars_mappings.PY_TYPE_TO_ARROW_TYPE
arrow2pl_mapping = dict(zip(pl2arrow_mappings.values(), pl2arrow_mappings.keys()))
Expand Down Expand Up @@ -51,7 +39,7 @@ def pascheme_to_plscheme(schema: pa.lib.Schema) -> collections.OrderedDict:
r"""Convert pyarrow schema to polars schema.
Args:
schema a pyarrow scheme
schema: a pyarrow scheme
Returns:
polars scheme
Expand Down

0 comments on commit 9efa96f

Please sign in to comment.