1. Learn
  2. /
  3. Courses
  4. /
  5. Data Processing in Shell

Connected

Exercise

File conversion and summary statistics with csvkit

It's common for Excel data files to have more than one worksheet (tab) of data. The Excel file SpotifyData.xlsx has two sheets named Worksheet1_Popularity and Worksheet2_MusicAttributes. Each sheet should be treated like its own data file, so we will use csvkit's commands here to convert each sheet to its own CSV file. Then, using the power of the commands we already know, print a high level summary for each column in the CSV files.

Instructions 1/4

undefined XP
  • 1
    • From SpotifyData.xlsx, convert the sheet "Worksheet1_Popularity" to CSV and call it Spotify_Popularity.csv.
  • 2
    • Print the high level summary statistics for each column in Spotify_Popularity.csv.
  • 3
    • From SpotifyData.xlsx, convert the tab "Worksheet2_MusicAttributes" to CSV and call it Spotify_MusicAttributes.csv.
  • 4
    • Print a preview of Spotify_MusicAttributes.csv using a function in csvkit with Markdown-compatible, fixed-width format.