I am trying to input this command:
example = pd.read_excel('080615_gene_expression.xlsx' , index_col = 0)but I get this error:
-bash: syntax error near unexpected token `('I have tried changing quotes, spaces etc = no change
The command works in IPython 3.0.0.
32 Answers
If I start your command in a bash, I get an interesting
bash: syntax error near unexpected token `('Start a Python interpreter by typing pythonEnter and then try the command again ;)
In my case, I get a
IOError: [Errno 2] No such file or directory: '080615_gene_expression.xlsx'but in my case that's absolutely normal as I don't have your excel sheet.
This is a Python command, not a Bash command. You can run a Python shell and then run your code by hand by typing:
ipythonIf you get an error that ipython command was not found, install it via:
pip install ipythonIf you're putting this into a script and trying to run it from the shell, your Python script needs to start with (first line of the file):
#!/usr/bin/env pythonThen you can run it from Bash as:
chmod +x my_script
./my_script.py