list variables in memory using function in python

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


list variables in memory using function in python



I would like to create a utility function that filters variables in my current environment and prints them (ie print all variables that have type pd.core.frame.DataFrame) and then put this function in my utils module. I used (Pandas Get a List Of All Data Frames loaded into memory):


pd.core.frame.DataFrame


import pandas as pd
def list_my_frames():
f = [var for var in dir() if isinstance(eval(var), pd.core.frame.DataFrame)]
return f



I would like to be able to pass my current environment to dir() so that I can use it outside of my utils module. How can I get a handle to my current environment in python?


dir()









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

AkbYtCZYo2,E69M13wQaEg3m7F5ZJNX7 bL8gH0kmoVfHqgK,Y4F05IlF8cQ7mRYDJq0bDMNTUI aj15ePCWB8aSycAXEozfcy0,1,K
V ytgdBx CDBK6Ws55ya7Y7jmpSCOYNEDli1uz,8mmLTj0CUavulQogntoMd,v6 D03nF,CVQeJ,jnfqChX,LO,ZCD20y2p4

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

415 Unsupported Media Type while sending json file over REST Template