Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- from io import StringIO
- test = str("Command exited with status 0.\n=== stdout ===\nUID PID PPID C STIME TTY TIME CMD\nroot 1 0 0 May16 ? 00:00:06 /sbin/init\nroot 2 0 0 May16 ? 00:00:00 [kthreadd]\nroot 4 2 0 May16 ? 00:00:00 [kworker/0:0H]")[45:]
- df = pd.read_table(StringIO(test), sep=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement