How to load parquet files where some columns are lists
5 ビュー (過去 30 日間)
古いコメントを表示
I am trying to work with parquet files between python and MATLAB. Unfortutanely it seems matlab does not support reading parquet files if some of the columns are "unsupported types" such as lists/arrays/JSON (see https://ch.mathworks.com/help/releases/R2021a/matlab/import_export/datatype-mappings-matlab-parquet.html).
Is there maybe a way to force MATLAB to read in those columns as strings?
I thoughts about getting the parquet file header info with `parquetinfo` and force the VariableTypes of the columns with lists to be "string" but it seems the returned info file is read-only.
Thanks,
+Enea
1 件のコメント
Maik Berchten
2021 年 12 月 17 日
We're faced a similar problem and ended up converting the array to a CSV string and storing that as UTF8 string while generating the parquet file. Thanks for reporting this (and we're looking forward to a solution that doesn't need a workaround)!
--maik
回答 (1 件)
Divyanshu
2024 年 2 月 26 日
Hi Enea,
The Parquet Files or Parquet Formatted data was not supported in the MATLAB version R2021a. However, in the later versions these file formats are supported as mentioned in the release notes of R2021b:
Also there are two functions 'parquetread' and 'parquetwrite' through which you can work with parquet files from MATLAB. Please refer the following documentation links to read more about these functions:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!