Remove duplicate rows in CSV file

20 vues (au cours des 30 derniers jours)
mohammad Alsajri
mohammad Alsajri le 23 Juil 2019
Commenté : mohammad Alsajri le 25 Juil 2019
hello dear mathworkers,
I have a dataset consist of approximatlly 4 millions records, and i want to remove the duplicated rows or records, can any one help me with the way, i am using matlab 2018a . thanks in advance
  7 commentaires
madhan ravi
madhan ravi le 24 Juil 2019
Mohammed: Alex's solution should have solved your problem.
mohammad Alsajri
mohammad Alsajri le 25 Juil 2019
thanks for help guys

Connectez-vous pour commenter.

Réponse acceptée

Alex Mcaulley
Alex Mcaulley le 23 Juil 2019
Since all is numeric data, you can use:
data = xlsread('kdd.xlsx');
datanew = unique(data,'rows');
  2 commentaires
Shameer Parmar
Shameer Parmar le 23 Juil 2019
This is not working, because non of data is similar.. I dont find duplicate entries in this sheet provided by Mohammad Alsajri..
using your command, the 'data' and 'datanew' both are getting exact same..
Alex Mcaulley
Alex Mcaulley le 23 Juil 2019
This code works!
I guess the excel provided by Mohammad is just a small portion of the dataset (4 million of rows).

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Language Fundamentals dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by