Remove duplicates from table with string, datetime, double

조회 수: 11 (최근 30일)
Harry Lindner
Harry Lindner 2015년 6월 25일
댓글: Sean de Wolski 2015년 6월 26일
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.
  댓글 수: 2
Harry Lindner
Harry Lindner 2015년 6월 25일
How can I ignore those columns with unique (only focus on the first 2 columns is what I will eventually need)?
Thank you for the reply.

댓글을 달려면 로그인하십시오.

추가 답변 (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