Answers for "jupyter consumes 100 disk"

1

jupyter consumes 100 disk

#delete the data
a, b, c = pd.DataFrame(), pd.DataFrame(), pd.DataFrame()
lst = [a, b, c]
del a, b, c # dfs still in list
del lst     # memory release now

#Track CPU and RAM usage
import psutil # gives a single float value
psutil.cpu_percent() # gives an object with many fields
psutil.virtual_memory()
dict(psutil.virtual_memory()._asdict()) # you can convert that object to a dictionary
Posted by: Guest on September-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language