Remove duplicates from table with string, datetime, double
11 views (last 30 days)
Show older comments
Harry Lindner
on 25 Jun 2015
Commented: Sean de Wolski
on 26 Jun 2015
The data is attached, also below. If I remove duplicates in Excel, 4 rows of data get removed. None get removed using unique()
Thank you for the help!
Name,Date,Date2,N1,N2,N3,N4
Cat,11/30/2012,6/7/2010,-0.5,-0.005,-0.004227354,-0.005
Cat,11/30/2012,6/7/2010,1.8,0.0144,0.014572331,0.018
Cat,11/22/2013,6/7/2010,3.74013,0.0367,0.037401552,NaN
Cat,11/22/2013,6/7/2010,3.74013,0.0367,0.037401552,NaN
Cat,11/23/2013,6/7/2010,2.911714,0.0291,0.029116963,NaN
Cat,11/23/2013,6/7/2010,2.911714,0.0291,0.029116963,NaN
Cat,12/31/2010,6/7/2010,3.11296,0.0343,0.031767023,0.031767
Cat,12/30/2013,6/7/2010,2.462881,0.0242,0.024628875,NaN
Cat,12/30/2013,6/7/2010,2.462881,0.0242,0.024628875,NaN
Cat,12/31/2014,6/7/2010,1.887183,NaN,0.018871638,NaN
Cat,12/31/2014,6/7/2010,1.887183,NaN,0.018871638,NaN
0 Comments
Accepted Answer
Sean de Wolski
on 25 Jun 2015
unique sees nans as not equal
isequal(nan,nan)
ans =
0
You'll need to replace them with something else or ignore that column.
2 Comments
More Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!