How to read\open a csv file with millions of rows and hundreds of coloumns to compare/delete and save
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi
i have csv files with millions of rows and hundreds of coloumns that i want to open\read in order to compare the files, remove duplicates and save the new file as csv also, and many other modifications..
when i used csvreader the PC stuck! so any help here
9 comentarios
Respuestas (1)
George
el 12 de Ag. de 2016
fid = fopen('data.csv');
% your formatSpec will be very long because of the number of fields
formatSpec = '%s %s %f %d'; % reads a string, a string, a float, an integer
A = textscan(fid, formatSpec, 'HeaderLines', 1, 'Delimiter', ',');
fclose(fid);
csvread
Ver también
Categorías
Más información sobre Text Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!