<jupyter_start><jupyter_text>Data Transformation<jupyter_code># Data cleaning and transformation
df = df.drop(['Unnamed: 0'], axis=1)
df = df.replace('none',0,regex=True)
df.drop(columns=['location', 'link', 'advice-to-mgmt','pros','cons','summary', 'helpful-count'], inplace=True)
df.rename(columns={'work-balance-stars':'work-balance', 'culture-values-stars':'culture-value', 
                   'carrer-opportunities-stars':'opportunities-stars', 
                   'senior-mangemnet-stars':'management-stars','comp-benefit-stars':'benefits-stars'}, inplace=True)
df['work-balance'] = pd.to_numeric(df['work-balance'])
df['culture-value'] = pd.to_numeric(df['culture-value'])
df['opportunities-stars'] = pd.to_numeric(df['opportunities-stars'])
df['benefits-stars'] = pd.to_numeric(df['benefits-stars'])
df['management-stars'] = pd.to_numeric(df['management-stars'])

df.head()

df.to_csv("reviews.csv",index=False)
df.shape<jupyter_output><empty_output><jupyter_text>Data Analysis<jupyter_code>df.describe()
review_count = df['company'].value_counts()
plt.figure(figsize=(7,7))
review_count.plot(kind="bar")
plt.show()
plt.figure(figsize=(8,8))
sns.boxplot(x="overall-ratings", y="company", data=df, whis="range")
plt.xlabel('Overall Ratings', fontsize=14)
plt.ylabel('Company', fontsize=14)
plt.title('Companies Overall Ratings', fontsize=14)
plt.show()
plt.figure(figsize=(8,8))
sns.boxplot(x="work-balance", y="company", data=df, whis="range")
plt.xlabel('Work Balance Ratings', fontsize=14)
plt.ylabel('Company', fontsize=14)
plt.title('Companies Work Balance Ratings', fontsize=14)
plt.show()
plt.figure(figsize=(8,8))
sns.boxplot(x="opportunities-stars", y="company", data=df, whis="range")
plt.xlabel('Career Opportunities Stars', fontsize=14)
plt.ylabel('Company', fontsize=14)
plt.title('Companies Career Opportunities Stars', fontsize=14)
plt.show()
plt.figure(figsize=(8,8))
sns.boxplot(x="management-stars", y="company", data=df, whis="range")
plt.xlabel('Senior Management Stars', fontsize=14)
plt.ylabel('Company', fontsize=14)
plt.title('Companies Senior Management Stars', fontsize=14)
plt.show()
plt.figure(figsize=(8,8))
sns.boxplot(x="culture-value", y="company", data=df, whis="range")
plt.xlabel('Culture Values', fontsize=14)
plt.ylabel('Company', fontsize=14)
plt.title('Companies Culture Value Stars', fontsize=14)
plt.show()
plt.figure(figsize=(8,8))
sns.boxplot(x="benefits-stars", y="company", data=df, whis="range")
plt.xlabel('Benefit Stars', fontsize=14)
plt.ylabel('Company', fontsize=14)
plt.title('Companies Benefit Stars', fontsize=14)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19847036328871892, 'fraction_numerical': 0.02026768642447419, 'mean_word_length': 8.478260869565217, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '290134', 'license': 'MIT', 'n_tokens_mistral': 1033, 'n_tokens_neox': 932, 'n_words': 138, 'path': 'rating_analysis.ipynb', 'repo_name': 'reemaratnani/ETL-NoSQL-Database', 'size': '2615'}