开始使用免费开始使用

使用 csvkit 堆叠文件

SpotifyData_PopularityRank6.csvSpotifyData_PopularityRank7.csv 具有相同的文件格式、列顺序和整体数据模式。不过,一个文件包含排名为 #6 的歌曲信息,另一个文件包含排名为 #7 的歌曲信息。请通过堆叠将这两个文件合并为一个统一的文件。

本练习是课程的一部分

Shell 中的数据处理

查看课程

练习说明

  • SpotifyData_PopularityRank6.csvSpotifyData_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
编辑并运行代码