Remove duplicates from table with string, datetime, double

11 次查看(过去 30 天)
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

采纳的回答

Sean de Wolski
Sean de Wolski 2015-6-25
unique sees nans as not equal
isequal(nan,nan)
ans =
0
You'll need to replace them with something else or ignore that column.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by