Created
January 24, 2019 11:46
-
-
Save ei-grad/3f38766ed68d6d78741332047b44abe7 to your computer and use it in GitHub Desktop.
DFS (DataFrames Storage) - a handy container to reduce global namespace pollution and utilize autocomplete in Jupyter notebooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DFS(dict): | |
def __getattr__(self, key): | |
return self[key] | |
def __setattr__(self, key, value): | |
self[key] = value | |
def __dir__(self): | |
return list(self) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment