<jupyter_start><jupyter_text>2<jupyter_code>d={'a':45,'b':66,'c':44,'b':44}
d
'b' in d
d['c']=123
d
del(d['b'])
d
# Dictionary of dictionaries
europe = { 'spain': { 'capital':'madrid', 'population':46.77 },
           'france': { 'capital':'paris', 'population':66.03 },
           'germany': { 'capital':'berlin', 'population':80.62 },
           'norway': { 'capital':'oslo', 'population':5.084 } }
# Print out the capital of France
print(europe['france'])
# Create sub-dictionary data
data={'capital':'rome','population':59.83}
# Add data to europe under key 'italy'
europe['italy']=data
# Print europe
print(europe)
import pandas as pd
d=pd.DataFrame(europe)
d<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20893371757925072, 'fraction_numerical': 0.04610951008645533, 'mean_word_length': 5.376146788990826, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '165993', 'license': 'MIT', 'n_tokens_mistral': 292, 'n_tokens_neox': 259, 'n_words': 53, 'path': 'Datacamp/IntermediatePython/Dict.ipynb', 'repo_name': 'Dhaneshgupta1027/Python', 'size': '694'}