<jupyter_start><jupyter_text>1. Load the csv file to pandas<jupyter_code># loading data
df = pd.read_csv("summer-products_2020-08.csv")
df<jupyter_output><empty_output><jupyter_text>2. Check which columns are present<jupyter_code># Getting Info
df.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
RangeIndex: 1573 entries, 0 to 1572
Data columns (total 43 columns):
 #   Column                        Non-Null Count  Dtype  
---  ------                        --------------  -----  
 0   title                         1573 non-null   object 
 1   title_orig                    1573 non-null   object 
 2   price                         1573 non-null   float64
 3   retail_price                  1573 non-null   int64  
 4   currency_buyer                1573 non-null   object 
 5   units_sold                    1573 non-null   int64  
 6   uses_ad_boosts                1573 non-null   int64  
 7   rating                        1573 non-null   float64
 8   rating_count                  1573 non-null   int64  
 9   rating_five_count             1528 non-null   float64
 10  rating_four_count             1528 non-null   float64
 11  rating_three_count            1528 non-null   float64
 12  rating_two_count              1528 non-null   float64
 13  rat[...]<jupyter_text>3. Check and drop duplicate values<jupyter_code># checking duplicate values
df.duplicated().sum()
# Removing Duplicated Values
df.drop_duplicates(inplace=True)
# Copying the data to a new variable
df1 = df.copy()
df1<jupyter_output><empty_output><jupyter_text>4. Check the null values (When you execute sp.info(), you can see that various columns have lesser number of records than others that shows the presence of null values)<jupyter_code># Checking Null Values
df1.isnull().sum()<jupyter_output><empty_output><jupyter_text>5. Count the number of null values in each column. Analyze the possible reasons for the missing value and document the findings if any<jupyter_code>null = df1.isnull().sum().to_frame(name='nulls').T
null
dtype = df1.dtypes.to_frame(name='dtypes').T
dtype
nunique = df1.nunique().to_frame(name='unique').T
nunique
pd.concat([null,dtype,nunique],axis=0)<jupyter_output><empty_output><jupyter_text>6. Calculate count, mean, std, min, 25%, 50%, 75%, max values for each column. Prepare an analysis of the difference between mean and median for each column and possible reasons for the same.<jupyter_code># Describing the data
round(df1.describe())<jupyter_output><empty_output><jupyter_text>7. Prepare Histograms and Countplots<jupyter_code># Creating function to get all possible bar graphs.. 
 
 def hist_count(column, data, exclude_col):

     if column not in exclude_col:

             f, axes = plt.subplots(1,1,figsize=(15,5))

             sns.countplot(x=column, data=data)

             plt.xticks(rotation = 90)

             plt.suptitle(column, fontsize=20)

             plt.show()

     else:

             his = sns.FacetGrid(data, margin_titles=True, aspect = 4, height=3)

             his.map(plt.hist,column,bins=100)

             plt.show()

     plt.show()

 exclude_col = ['title', 'title_orig', 'currency_buyer', 'tags', 'merchant_title', 'merchant_name','merchant_info_subtitle', 'merchant_id', 'merchant_profile_picture', 'product_url','product_picture', 'product_id', 'theme', 'crawl_month' ]

 for column in df1.columns:

     hist_count(column,df1,exclude_col)<jupyter_output><empty_output><jupyter_text>8. Boxplot of ratings<jupyter_code># Creating box plot
sns.boxplot(df1['rating'])<jupyter_output><empty_output><jupyter_text>9. Price Vs Retail Price<jupyter_code># Price Vs Retail Price Density graph
sns.kdeplot(df1['price'])
sns.kdeplot(df1['retail_price'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10227576974564927, 'fraction_numerical': 0.039892904953145916, 'mean_word_length': 3.0697167755991286, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '564687', 'license': 'MIT', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1179, 'n_words': 304, 'path': 'clothsale.ipynb', 'repo_name': 'GD-Singh011/Sales-of-Summer-Cloths---Aug-2020-Data-Analysis', 'size': '3735'}