If you're already using pandas, you can construct a pandas Series or DataFrame from which you would be able to access items via the dot syntax:
1-level dictionary:
import pandas as pdmy_dictionary = pd.Series({'key1': 'value1','key2': 'value2'})print(my_dictionary.key1)# Output: value1
2-level dictionary:
import pandas as pdmy_dictionary = pd.DataFrame({'key1': {'inner_key1': 'value1' },'key2': {'inner_key2': 'value2' }})print(my_dictionary.key1.inner_key1)# Output: value1
Be aware that this probably works better with a normalised data structure (where each dictionary entry has the same structure). In the second example above, the resulting DataFrame is:
key1 key2inner_key1 value1 NaNinner_key2 NaN value2