<jupyter_start><jupyter_text><jupyter_code>import pandas as pd<jupyter_output><empty_output><jupyter_text>1. Select dataset of your choice.Selected 'State_Drug_Utilization_Data_2010' dataset.<jupyter_code>df_card = pd.read_csv("State_Drug_Utilization_Data_2010_Hari.csv")<jupyter_output><empty_output><jupyter_text>2a. Show the .head() and .tail() of the data set. Specify the number of rows to print using .head() and .tail().<jupyter_code>df_card.head()
df_card.tail()
df_card.head(25)
df_card.tail(25)<jupyter_output><empty_output><jupyter_text>2b. Print the column names.<jupyter_code>df_card.columns<jupyter_output><empty_output><jupyter_text>2c. Print to see what is the type of your data set<jupyter_code>print(type(df_card))
df_card.dtypes<jupyter_output><empty_output><jupyter_text>2d. Check number of rows and columns.<jupyter_code>df_card.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
RangeIndex: 156219 entries, 0 to 156218
Data columns (total 21 columns):
 #   Column                          Non-Null Count   Dtype  
---  ------                          --------------   -----  
 0   Unnamed: 0                      156219 non-null  int64  
 1   Utilization Type                156219 non-null  object 
 2   State                           156219 non-null  object 
 3   Labeler Code                    156219 non-null  int64  
 4   Product Code                    156219 non-null  int64  
 5   Package Size                    156219 non-null  int64  
 6   Year                            156219 non-null  int64  
 7   Quarter                         156219 non-null  int64  
 8   Product Name                    156192 non-null  object 
 9   Units Reimbursed                77002 non-null   float64
 10  Suppression Used                156219 non-null  bool   
 11  Number of Prescriptions         77002 non-null   float64
 12  Total Amount Rei[...]<jupyter_text>2e. Use groupby() and find the mean on your selected colum/s.<jupyter_code>df_card.groupby(['Year','State'])[['Total Amount Reimbursed','Medicaid Amount Reimbursed']].mean()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0936007640878701, 'fraction_numerical': 0.06494746895893028, 'mean_word_length': 2.4916666666666667, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '323148', 'license': 'MIT', 'n_tokens_mistral': 770, 'n_tokens_neox': 674, 'n_words': 161, 'path': 'Data_mining_week_1_Hari_Kosaraju.ipynb', 'repo_name': 'harikosaraju9/Data_612_assignments', 'size': '2094'}