<jupyter_start><jupyter_text>Python Modules<jupyter_code>!pip install pandas
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
import seaborn as sns
df = pd.read_csv("Height.csv")
df

df.rename(columns = {'Mention your height (in cm)' : 'height'}, inplace = True)
df
df['height'].value_counts()
df.iloc[32,1]
str.upper(df.iloc[32,1])
lii = [ele for ele in df['height'].str.upper() if 'CM' in ele]
lii
req_li = [ele.split()[0] for ele in lii]
req_li
df = pd.DataFrame(df['height'].str.upper().replace(lii, req_li), columns = ['height'])
df

str = '167 cm'
li = str.split()[0]
print(li)
print(str)
df.loc[30,'height']
df.iloc[30,0]
df.iloc[3,0]=165
df1 = df.drop(labels = 21, axis = 0)
df1
df
df.iloc[21,0]=0
df = df.astype({'height' : float})
df1 = df1.astype({'height' : float})
df.iloc[21,0] = np.mean(df1.height)
df

plt.hist(df.height, bins = 40)
sns.kdeplot(df.height)<jupyter_output><empty_output><jupyter_text>Computing Percentile<jupyter_code>arr = np.percentile(df.height,[25,50,75])
arr<jupyter_output><empty_output><jupyter_text>calculate IQR<jupyter_code>iqr = arr[2]-arr[0]
iqr<jupyter_output><empty_output><jupyter_text>Finding Outliers<jupyter_code>df.height[((df.height) < arr[0] - iqr) | (df.height) > arr[2]-iqr]
sns.boxplot(df.height)<jupyter_output>C:\Users\Arkaprava\anaconda3\lib\site-packages\seaborn\_decorators.py:36: FutureWarning: Pass the following variable as a keyword arg: x. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.
  warnings.warn(<jupyter_text>Computing Standard Deviation and Variance<jupyter_code>print("variance is", round(np.var(df.height),2))
print("Standard Deviation is", round(np.std(df.height),2))<jupyter_output>Standard Deviation is 6.69
{'fraction_non_alphanumeric': 0.15614798694232862, 'fraction_numerical': 0.032100108813928184, 'mean_word_length': 6.599173553719008, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '479287', 'license': 'MIT', 'n_tokens_mistral': 760, 'n_tokens_neox': 721, 'n_words': 155, 'path': 'Solving the age Data.ipynb', 'repo_name': 'arkaprava26/Data-Science-assignment', 'size': '1838'}