<jupyter_start><jupyter_text>Descriptive statistics of numerical data<jupyter_code>df.describe()   # displays descriptive statistics of the numerical data in the dataset
                # (mean, std, min value, max value, quartiles)<jupyter_output><empty_output><jupyter_text>Summary of categorical data<jupyter_code>df['num-of-doors'].value_counts()  # get a brief summary of the categorical data<jupyter_output><empty_output><jupyter_text>Box Plots<jupyter_code># shows the distribution of price of cars with different number of cylinders
sns.boxplot(x='num-of-cylinders',y='price',data=df)<jupyter_output><empty_output><jupyter_text>Scatter Plots<jupyter_code># Represent the ralationship between the 'engine size' and the 'price'
plt.scatter(df['engine-size'],df['price'])
plt.xlabel('Engine Size')
plt.ylabel('Price')
plt.show()<jupyter_output><empty_output><jupyter_text>Histograms<jupyter_code># Represent the distribution of “peak-rpm” using histogram
count,bin_edges = np.histogram(df['peak-rpm'])
df['peak-rpm'].plot(kind='hist',xticks=bin_edges)
plt.xlabel('Value of peak rpm')
plt.ylabel('Number of cars')
plt.grid()
plt.show()<jupyter_output><empty_output><jupyter_text>Data Grouping<jupyter_code># know the average price of different types of vehicles and 
# observe how they differ according to body styles and number of doors.

df_temp = df[['num-of-doors', 'body-style', 'price']]
df_group = df_temp.groupby(['num-of-doors', 'body-style'],as_index=False).mean()
df_temp
df_group
# convert it to a pivot table to read it better 
df_pivot = df_group.pivot(index='body-style',columns='num-of-doors')
df_pivot<jupyter_output><empty_output><jupyter_text>Handling the missing data<jupyter_code># determine if a particular cell in the dataframe has missing value or not
df.isnull()<jupyter_output><empty_output><jupyter_text>Heatmaps<jupyter_code># visually detect the missing data
sns.heatmap(df.isnull())
plt.show()
df.dropna()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12493651599796851, 'fraction_numerical': 0.0, 'mean_word_length': 7.873873873873874, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '634769', 'license': 'MIT', 'n_tokens_mistral': 701, 'n_tokens_neox': 667, 'n_words': 152, 'path': 'Automobile/automobile.ipynb', 'repo_name': 'raniaelhagin/EDA', 'size': '1969'}