<jupyter_start><jupyter_text>pandas loc methodaccess a group of rows and columns by label(s) or a boolean array<jupyter_code>import pandas as pd 
data =pd.read_csv('C:\\Users\\admin\\Desktop\\book1.csv')
data
data.loc[0]
data.loc[3]
data.loc[[1,3]]
data.loc[[4,3]]
data.loc[1,"Date"]
data.loc[1:5,"marks"]<jupyter_output><empty_output><jupyter_text>pandas iloc method  select data by indexing<jupyter_code>data.iloc[[0]]
data.iloc[0]
data.iloc[[0,1]]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16875, 'fraction_numerical': 0.029166666666666667, 'mean_word_length': 7.589285714285714, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '233941', 'license': 'MIT', 'n_tokens_mistral': 205, 'n_tokens_neox': 201, 'n_words': 35, 'path': 'loc & iloc method in pandas.ipynb', 'repo_name': 'akshhpatil/pandas-tutorial', 'size': '480'}