0

dataframe machine

Hi, Above is my data frame I want to execute .csh launch for given machine, is there any way to iterate and execute .csh instead of printing value using iterrows.

for idx, row in df.iterrows():
     print(launch.iloc[index])
3
  • probably something like subprocess.call(['csh', row['launch'], row['Machine ID']]) although it's unclear exactly where the Machine ID should occur. Commented Apr 29, 2024 at 6:44
  • @mozway Thanks this worked, Also If I want to run .cshrc source or alias what should be command subprocess? Commented Apr 29, 2024 at 9:37
  • Nor sure, but once you find this out, just craft the subprocess call to add the required parameters. Commented Apr 29, 2024 at 11:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.