Combine detectImportOptions with datastore?
5 ビュー (過去 30 日間)
古いコメントを表示
I have a set of files that I would like to process with a tabularTextDatastore. The content of the files has some specific format (many columns, special encoding, etc.) which is not properly detected by the datastore. Using detectImportOptions and readtable, I am able to load my files in the way that I want. Is there a way to use the 'opts' object that is generated with detectImportOptions as input to the datastore so that I don't have to 'manually' set the relevant Name,Value pairs?
0 件のコメント
採用された回答
Harsh
2018 年 7 月 24 日
Sounds like you'd like to do the following:
>> opts = detectImportOptions(file,'name',value...);
% Optionally configure various opts.properties
>> ds=tabularTextDatastore(‘location', opts)
>> read(ds)
You're right in that currently none of the datastores accept an ImportOptions object. Manually configuring the relevant Name,Value pairs is the suggested approach for now.
2 件のコメント
Chandan Nene
2018 年 10 月 9 日
Is this (that is, allowing ImportOptions to be passed to datastore) planned to be included in near future?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Datastore についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!