Got error in joining two tables: Left and right key variables 'Date' and 'Date' include cells containing non-string values.
33 次查看(过去 30 天)
显示 更早的评论
Hi, I have two tables a and b. Both have a column Date as datenum. When I use left join, I got this error: "Left and right key variables 'Date' and 'Date' include cells containing non-string values." One table has 600 records; the other table is very large and has 25000 records. What can be the problem here and how to fix this?
Thanks for any input.
回答(1 个)
Peter Perkins
2017-12-22
The error seems clear: you are trying to use a variable that is not supported as a key. You say that you have a datenum variable, the error suggests that that is not the case, that you have a cell array containing datenums.
If you are using anything like a recent version of MATLAB, you will likely be better of using datetimes.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series Objects 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!