1つのCSVファイルを分割してインポート
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
CSVファイルをインポートし解析をしたいのですが、データが全体のデータが20000ほどあり、これを1000データずつ読み込み解析したいと考えています。こちらのやり方が分かららず困っています。 ご指導して頂けると幸いです。
0 commentaires
Réponse acceptée
Kojiro Saito
le 18 Jan 2021
datastoreのReadSizeを1000にして、1チャンク毎に処理すれば良いと思います。
ds = datastore('mydata.csv', 'ReadSize', 1000);
while hasdata(ds)
t = read(ds); % 1000データずつの読み込み
% ここに1000データずつの解析
%
end
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur テキスト ファイル dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!