Filter a timetable (balance a panel data)
이전 댓글 표시
Hello,
I have a timetable and I want to keep those days that coincide between each value from my variable "Id". In the example I put here, I start with my timetable T where there are three different "Id". My goal would be to end up with a timetable T_1 where only the observations where the dates coincide between each "Id" are kept.
T= timetable(datetime({'13/04/2018';'25/04/2018';'28/04/2018';'13/04/2018';'25/04/2018';'13/04/2018'}), [1;1;1;2;2;3],[30;29;45;21;24;8] );
T.Properties.VariableNames = {'Id' 'Price'}
%I want to get:
T_1=timetable(datetime({'13/04/2018';'13/04/2018';'13/04/2018'}), [1;2;3],[30;21;8] );
I woudl be really thankful if you can help me!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Timetables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!