Would need your kind help here.
Thanks.
Is this what are you asking for?
global_variable = 'hello'
print(globals()['global_variable']) # prints hello
More explanation:
- You cannot name a function
global()
in Python becauseglobal
is a keyword. - Using the function
globals()
you can access the variables in the current module scope (also called global variables). The function returns a dictionary. Keys of the dictionary are the variable names.
I do not know what did you mean by “dynamic dataframe”. Maybe a scope in which variables exist (like the global scope)?