Understanding Arguments for Using System Shell Commands from IPython

Asked 2 years ago, Updated 2 years ago, 70 views

For example,

!less "book.csv"

is executable, but

file="book.csv"
!less file

If so, it will be an error.
Is this functionally impossible?
In that case, I would like to loop and execute commands on multiple files, but would that be impossible?

python command-line

2022-09-29 22:04

1 Answers

You can pass variables in the format $variable or {variable}

Note: IPython Shell Assignment

file="book.csv"
out=!cat$file
print(out.l)


2022-09-29 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.