How to separate a column which has a comma separated values, into 2 different values?
11 ビュー (過去 30 日間)
古いコメントを表示
Hello, Who knows how to separate this column into the name of the city and state (comma-separated value)? and then I need to add this new column to my current table, so I would love to know, thanks in advance!
0 件のコメント
回答 (1 件)
Voss
2023 年 2 月 2 日
city = ["Abilene, TX"; "Waco, TX"; "Arcata/Eureka, CA"];
t = table(city)
city_state = split(t.city,", ");
t.city = city_state(:,1);
t.state = city_state(:,2);
t
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!