Saturday, 15 March 2014

python - How to use tools directory in "data science at the command line" repo? -


I created a project to copy the code in "Jr. Genens" "Data Science on the Command Line". GitHub repo is cloned in a local directory. (I did not want to use Wgrent-based setup and ignored manual installation.)

The repo has a tool directory, but it is unclear to me how any tool launched. Go command line They include Drake, Rio, Scrap, Waka.

I know that I am missing something very simple, but it is to save me signal / <>

Generally, If you have a script (or command line tool) in the same directory, you can execute it by using ./my-script . If you are not in the same directory, you can use the relative or full path. For example, for Rio , you can run something like this:

  $ cd ~ / data-science-at-the-command-line / book $ Cat ch05 / data / iris.csv | ../tools/Rio-e 'mean (df $ sepal_length)' 5.843333  

If you want to use a certain command line tool more often, or execute it from anywhere It is helpful to insert the directory on your file system without specifying your file, which includes the command line tool on PATH . You can set this, for example, in ~ / .bashrc (assuming that Bash is your shell).


No comments:

Post a Comment