csvkit でファイルをスタックする
SpotifyData_PopularityRank6.csv と SpotifyData_PopularityRank7.csv は、同じファイル形式、列順、そしてデータスキーマを持っています。ただし、一方にはランキング6位の楽曲情報、もう一方にはランキング7位の楽曲情報が含まれています。これら2つのファイルをスタックして、1つの統合ファイルにまとめてください。
この演習はコースの一部です
シェルでのデータ処理
演習の手順
SpotifyData_PopularityRank6.csvとSpotifyData_PopularityRank7.csvをスタックしてください。スタック結果の出力をリダイレクトし、新しいファイルSpotifyPopularity.csvとして保存します。
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Stack the two files and save results as a new file
___ SpotifyData_PopularityRank6.csv SpotifyData_PopularityRank7.csv ___ SpotifyPopularity.csv
# Preview the newly created file
csvlook SpotifyPopularity.csv