Database Reference
In-Depth Information
• Decompress files
• Convert Microsoft Excel spreadsheets into usable data
Copying Local Files to the Data Science Toolbox
A common situation is that you already have the necessary files on your own
computer. This section explains how you can get those files onto the local or remote
version of the Data Science Toolbox.
Local Version of Data Science Toolbox
We mentioned in Chapter 2 that the local version of the Data Science Toolbox is an
isolated virtual environment. Luckily, there is one exception to that: files can be trans‐
fered in and out the Data Science Toolbox. The local directory from which you ran
vagrant up (which is the one that contains the file Vagrantile ) is mapped to a direc‐
tory in the Data Science Toolbox. This directory is called /vagrant (note that this is
not your home directory). Let's check the contents of this directory:
$ ls -1 /vagrant
Vagrantfile
If you have a file on your local computer, and you want to apply some command-line
tools to it, all you have to do is copy or move the file to that directory. Let's assume
that you have a file called logs.csv on your Desktop. If you are running GNU/Linux or
Mac OS X, execute the following command on your operating system (and not inside
the Data Science Toolbox) from the directory that contains Vagrantile :
$ cp ~/Desktop/logs.csv .
And if you're running Windows, you can run the following on the Command Prompt
or PowerShell:
> cd % UserProfile %\ Desktop
> copy logs . csv MyDataScienceToolbox \
You may also drag and drop the file into the directory using Windows Explorer.
The file is now located in the directory /vagrant . It's a good idea to keep your data in a
separate directory (here we're using ~/book/ch03/data , for example). So, after you
have copied the file, you can move it by running:
$ mv /vagrant/logs.csv ~/book/ch03/data
Remote Version of Data Science Toolbox
If you are running Linux or Mac OS X, you can use scp (Rinne & Ylonen, 2014),
which stands for secure copy , to copy files onto the EC2 instance. You will need the
Search WWH ::




Custom Search