<jupyter_start><jupyter_text>Import the pickle package.<jupyter_code># Import pickle package
import pickle<jupyter_output><empty_output><jupyter_text>Complete the second argument of open() so that it is read only for a binary file. This argument will be a string of two letters, one signifying 'read only', the other 'binary'.<jupyter_code># Open pickle file and load data: d
with open('data.pkl', 'rb') as file:
    d = pickle.load(file)<jupyter_output><empty_output><jupyter_text>Pass the correct argument to pickle.load(); it should use the variable that is bound to open.<jupyter_code>#d = pickle.load(file)<jupyter_output><empty_output><jupyter_text>Print the data, d.Print the datatype of d; take your mind back to your previous use of the function type().<jupyter_code># Print d
print(d)

# Print datatype of d
print(type(d))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09860788863109049, 'fraction_numerical': 0.0, 'mean_word_length': 6.504347826086956, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '657755', 'license': 'MIT', 'n_tokens_mistral': 286, 'n_tokens_neox': 283, 'n_words': 97, 'path': 'import data part 1/Loading a pickled file.ipynb', 'repo_name': 'nazmusshakib121/Importing-Cleaning-Data-with-Python', 'size': '862'}