<jupyter_start><jupyter_text>Exploratory Data Analysis (EDA)----Exploratory Data Analysis (EDA) is the process of analyzing datasets with the aim of understanding them more deeply. As the term “exploratory” suggests, during EDA the focus is to explore or understand the data better.Some of the common practices in EDA are:* Looking at the data types of the variables* Identifying the most important variables* Looking at the distributions of the variables* Summarizing the data* Finding biases in the data* Looking at the different trends in data* Studying relationships among quantities* Spotting anomalies in the data* Visualizing the data  Summary Stats----Let's first summarize the dataset.<jupyter_code>df = pd.read_csv('/kaggle/input/default-of-credit-card-clients-dataset/UCI_Credit_Card.csv')
display(df.head(5))

#summarize stats
print(df[['EDUCATION','AGE']].describe())<jupyter_output><empty_output><jupyter_text>By looking at the output we can find out that : 1. average age is 35 2. 50% of age is at 28 which means 50% of people in the dataset are below 283. 75% aducation is 2 which means 75% people if the dataset have been no university  Categorical Variable-----By look at the dataset we can see three important categorical variables EDUCATION, SEX, and MARRIAGE, let's explore them.<jupyter_code>import matplotlib.pyplot as plt 

print('value counts of gender :', df['EDUCATION'].value_counts())
print('value counts of gender :', df['SEX'].value_counts())
print('value counts of gender :', df['MARRIAGE'].value_counts())

fig, plots = plt.subplots(1,3, figsize=(13,10))

df['EDUCATION'].value_counts().plot(kind='bar',ax=plots[0], title='EDUCATION')
df['SEX'].value_counts().plot(kind='bar',ax=plots[1], title='SEX')
df['MARRIAGE'].value_counts().plot(kind='bar',ax=plots[2], title='MARRIAGE')
plt.show()<jupyter_output>value counts of gender : 2    14030
1    10585
3     4917
5      280
4      123
6       51
0       14
Name: EDUCATION, dtype: int64
value counts of gender : 2    18112
1    11888
Name: SEX, dtype: int64
value counts of gender : 2    15964
1    13659
3      323
0       54
Name: MARRIAGE, dtype: int64<jupyter_text>first we created a subplots of 1 ros and 3 columns and figuresize (13,10), the fuction return a tuple of figure and axes. we later use the axes to plot 3 different bar plot in a single figure.   Distributions----Looking at the distributions of the variables can be very helpful and can give us key insights.we will plot a histogram of AGE variable to find out how the AGE of people are distributed.<jupyter_code>cbins = [20,25,30,35,40,45,50,55,60,65,70,75,80]
df['AGE'].plot(kind='hist', bins=cbins, rwidth=0.8)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10388170055452865, 'fraction_numerical': 0.04842883548983364, 'mean_word_length': 4.960352422907489, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '261602', 'license': 'MIT', 'n_tokens_mistral': 933, 'n_tokens_neox': 824, 'n_words': 324, 'path': 'Jupyter-Notebook/Intro to Data Science/intro-to-data-science-eda-individual-quantities.ipynb', 'repo_name': 'shohan4556/machine-learning-course-notes', 'size': '2705'}