Search code examples
pythoncsvipythondata-analysis

python for data analysis


I am learning data analysis with the help of a book named'python for data analysis'.Every thing goes well.But i get a problem that i do not know what is going on.

The instruction from the book is:

In [846]: !cat ch06/ex1.csv

But when I input it in canopy, it comes out with

!cat ch06/ex1.csv

Der Befehl "cat" ist entweder falsch geschrieben oder konnte nicht gefunden werden."

The error comment is in german,and it means "the instruction 'cat' is wrong written or can not be found".

What does the '!'mean in this line.?

And the 'cat'? why can't the editor figure it out ?

Do I need to import a module to fix this?


Solution

  • You can execute linux commands in jupyter notebook(python) by putting "!" in front of a command.

    for example

    !cat test.txt 
    
    !echo "hello"