<jupyter_start><jupyter_text>Manipulating the index<jupyter_code>reviews.set_index("hotel")
reviews.hotel == 'Resort Hotel'
reviews.loc[reviews.hotel == 'Resort Hotel']
reviews.loc[(reviews.hotel == 'Resort Hotel') & (reviews.lead_time >= 90)]
reviews.loc[reviews.hotel.isin(['Resort Hotel'])]
reviews.loc[reviews.hotel.notnull()]<jupyter_output><empty_output><jupyter_text>Assigning data<jupyter_code>reviews['critic'] = 'everyone'
reviews['critic']
reviews['index_backwards'] = range(len(reviews), 0, -1)
reviews['index_backwards']<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17229129662522202, 'fraction_numerical': 0.007104795737122558, 'mean_word_length': 11.26086956521739, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '610564', 'license': 'Apache-2.0', 'n_tokens_mistral': 226, 'n_tokens_neox': 220, 'n_words': 25, 'path': 'data-science/pandas/02.Indexing, Selecting & Assigning.ipynb', 'repo_name': 'le3t/ko-repo', 'size': '563'}