<jupyter_start><jupyter_text>Let's see how attacking power of pokemon is distributed across all Generations !!<jupyter_code>#We will make use of histplot to see distribution
sns.histplot(pokemon_data["Attack"])
plt.axvline(pokemon_data["Attack"].mean(), color = "red")
#plot distplot
sns.distplot(pokemon_data["Attack"])<jupyter_output>C:\Users\<NAME>\.conda\envs\py37\lib\site-packages\seaborn\distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)<jupyter_text>Above histogram shows distribution of attack for Pokemon with average value lying between 75 to 77.  Finding Correlation between the attributes<jupyter_code>## plot heatmap of correlations
pokemon_data.corr()
sns.heatmap(pokemon_data.corr(), annot = False)<jupyter_output><empty_output><jupyter_text>From above heatmap we can see that there is not much correlation between attributes of pokemon dataset. The highest correlation is betwwen Total Stregth and Sp.Attk attribute that is of 0.75 .  Fire V/S Water Pokemon attacking and defense power<jupyter_code>#first we need to separate data for fire and water pokemon
fire = pokemon_data[(pokemon_data["Type 1"] == "Fire" ) | (pokemon_data["Type 2"] == "Fire")]
water = pokemon_data[(pokemon_data["Type 1"] == "Water") | (pokemon_data["Type 2"] == "Water")]
#fire shape
fire.shape
#water shape
water.shape
#plotting scatter plot for fire and water type pokemon comparing attack and defense
sns.scatterplot( x = "Attack", y ="Defense", data = fire, label = "Fire")
sns.scatterplot( x = "Attack", y = "Defense", data = water, label = "Water")
#plotting regression plot for the same
sns.regplot( x = "Attack", y ="Defense", data = fire, label = "Fire")
sns.regplot( x = "Attack", y = "Defense", data = water, label = "Water")<jupyter_output><empty_output><jupyter_text>We can draw 2 conclusions from above plot :(1) On plottting regplot we found out that for both fire and water type attack and defense power is positively related but for water type for some same particular value of attack power it has better defense power than fire type.(2)We can also infer that fire type has better attack power that water type but water type has better defense power than fire type  Swarmplot - Generation V/S Speed<jupyter_code>#Plotting Swarm plot
plt.figure(figsize = (10,10))
sns.swarmplot(x ="Generation", y="Speed", data =pokemon_data)<jupyter_output><empty_output><jupyter_text>Do pokemon is legendary or not affects its total strength ?<jupyter_code>#plot barplot with x axis as Pokemon name and y axis as total strength
a = sns.barplot( x = "Legendary", y ="Total", data = pokemon_data)
a.set_xticklabels(a.get_xticklabels(), rotation = 90)<jupyter_output><empty_output><jupyter_text>We observe that mean total strength for Legendary value True is greater than value for Legendary value False  Number of Pokemons by each type and Generation<jupyter_code>#transforming dataset
a = pokemon_data.groupby(["Generation","Type 1"]).count().reset_index()
a
a = a[["Generation", "Type 1", "Total"]]
a
a = a.pivot("Generation", "Type 1", "Total")
a
#plotting lineplot
sns.lineplot(data = a)<jupyter_output><empty_output><jupyter_text>Outliers - Boxplot<jupyter_code>#boxplot
sns.boxplot(x = pokemon_data["Speed"])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10659025787965616, 'fraction_numerical': 0.00830945558739255, 'mean_word_length': 6.303347280334728, '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': '402244', 'license': 'MIT', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1082, 'n_words': 383, 'path': 'Week-2/Pokemon_DV.ipynb', 'repo_name': 'Krittika20/ML-Session', 'size': '3503'}