All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
As soon as you turn on your lab, your bash will start in a given directory. What's the full path of that directory?
Assuming you're still in /app
, how many directories do you see in the current path? You can ignore .
and ..
.
Count only the files with a .csv
extension.
How many total lines does the file have? Considering header + data. Total number of lines.
The data/Electricity1970.csv
file contains "Cost Function of Electricity Producers in 1970" (see docs). The first column of the dataset is the ID of the sample.
What is the ID (numeric, integer) of the second to last row?
Create an empty directory named my-data
inside the /app
dir.
Create a file named sales.csv
inside the my-data
directory that you have previously created. The sales.csv
file should contain only one line:
ID,Name,Concept,Quantity,Price,Total,Comments
There's a .json
file incorrectly located in the scripts/
directory; move it back to the data/
directory. Don't change it, and make sure you're MOVING it (that means, the file no longer will be located in the scripts/
dir).
Duplicate the file data/Electricity1970.csv
into the new file data/Electricity1970-copy.csv
Create a symlink in /app
that points to data/Electricity1970.csv
. The symlink should have the same name (Electricity1970.csv
) but be located in /app
.