<jupyter_start><jupyter_text>0. load dataset<jupyter_code>import numpy as np 

import pandas as pd 

import matplotlib.pyplot as plt 

df = pd.read_excel("Sample - Superstore.xls") 

df.head()<jupyter_output><empty_output><jupyter_text>1. Extract the countries/states/cities<jupyter_code>df['State'].unique()<jupyter_output><empty_output><jupyter_text>2. Use the nunique method to count the number of unique values<jupyter_code>df['State'].nunique()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11899791231732777, 'fraction_numerical': 0.006263048016701462, 'mean_word_length': 7.888888888888889, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '117026', 'license': 'MIT', 'n_tokens_mistral': 183, 'n_tokens_neox': 177, 'n_words': 32, 'path': 'Chapter04/.ipynb_checkpoints/Exercise 49-checkpoint.ipynb', 'repo_name': 'arifmudi/The-Data-Wrangling-Workshop', 'size': '479'}