From 4cdcc84f25178bf13e85559826bce00b43cd701e Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:43:40 -0800 Subject: [PATCH] Address review --- python/cudf/cudf/_lib/parquet.pyx | 2 +- python/pylibcudf/pylibcudf/io/parquet_metadata.pyx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/cudf/cudf/_lib/parquet.pyx b/python/cudf/cudf/_lib/parquet.pyx index 1d959ddce40..d4bd0cd306c 100644 --- a/python/cudf/cudf/_lib/parquet.pyx +++ b/python/cudf/cudf/_lib/parquet.pyx @@ -383,7 +383,7 @@ cpdef read_parquet_metadata(list filepaths_or_buffers): col_names = [info.name() for info in parquet_metadata.schema().root().children()] index_col_names = set() - json_str = parquet_metadata.metadata()[b'pandas'].decode('utf-8') + json_str = parquet_metadata.metadata()['pandas'] if json_str != "": meta = json.loads(json_str) file_is_range_index, index_col, _ = _parse_metadata(meta) diff --git a/python/pylibcudf/pylibcudf/io/parquet_metadata.pyx b/python/pylibcudf/pylibcudf/io/parquet_metadata.pyx index 6c66303b5b3..352905ff0f8 100644 --- a/python/pylibcudf/pylibcudf/io/parquet_metadata.pyx +++ b/python/pylibcudf/pylibcudf/io/parquet_metadata.pyx @@ -68,7 +68,7 @@ cdef class ParquetColumnSchema: Returns ------- list[ParquetColumnSchema] - Children schemas. + Child schemas. """ cdef cpp_parquet_metadata.parquet_column_schema child return [ @@ -160,14 +160,14 @@ cdef class ParquetMetadata: cpdef dict metadata(self): """ - Returns the Key value metadata in the file footer. + Returns the key-value metadata in the file footer. Returns ------- dict[bytes, bytes] Key value metadata as a map. """ - return self.meta.metadata() + return {key.decode(): val.decode() for key, val in self.meta.metadata()} cpdef list rowgroup_metadata(self): """