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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!