<jupyter_start><jupyter_text>Assessment  I am going to provide two .csv files , you are supposed to work on them and have to provide solutions to the following problems  import necessary libraries<jupyter_code>import pandas as pd
import numpy as np
import io<jupyter_output><empty_output><jupyter_text>merge those two csv files (after getting as dataframes, get them as a single dataframe)<jupyter_code>from google.colab import files
uploaded = files.upload()
upoaded2=files.upload()
df = pd.concat(
    map(pd.read_csv, ['college_1.csv', 'college_2.csv']), ignore_index=True)
print(df)
df.head()
print(df.columns)
Codekata_score=df['CodeKata Score']
name=df["Name"]<jupyter_output>Index(['Name', 'python', 'mysql', 'Previous Geekions', 'CodeKata Score',
       'Department', 'Rising', 'python_en', 'computational_thinking'],
      dtype='object')<jupyter_text>Take each csv file , split that csv file into multiple categories (example csv files are added in the repo)<jupyter_code>import csv
with open('Exceeded expectations.csv', 'w', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([ "Name", "CodekataScore"])
    for i in range(0, len(df)):
      if Codekata_score[i]>15000:
       writer.writerow([name[i],Codekata_score[i]])
  
with open('Reached_expectations.csv', 'w', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([ "Name", "CodekataScore"])
    for i in range(0, len(df)):
      if Codekata_score[i]>10000 and  Codekata_score[i]<15000: 
       writer.writerow([name[i],Codekata_score[i]])
  

with open('Needs_improvement.csv', 'w', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([ "Name", "CodekataScore"])
    for i in range(0, len(df)):
      if Codekata_score[i]>7000 and  Codekata_score[i]<10000: 
       writer.writerow([name[i],Codekata_score[i]])<jupyter_output><empty_output><jupyter_text>consider if the codekata score exceeds 15000 points(present week) then make a csv on those observations as Exceeded expectations.csv  if  10000<codekata score<15000   (Reached_expectations.csv)  if  7000<codekata score<10000   (Needs_Improvement.csv)  if  codekate score < 7000        (Unsatisfactory.csv)<jupyter_code>with open('Unsatisfactory.csv', 'w', newline='') as file:
    writer = csv.writer(file)
    writer.writerow([ "Name", "CodekataScore"])
    for i in range(0, len(df)):
      if Codekata_score[i]<7000: 
       writer.writerow([name[i],Codekata_score[i]])<jupyter_output><empty_output><jupyter_text>Average of previous week geekions vs this week geekions (i.e Previous Geekions vs CodeKata Score)<jupyter_code>average_previous_week_geekcoins = df["Previous Geekions"].values.mean()
print(average_previous_week_geekcoins)
average_codekata_score =df["CodeKata Score"].values.mean()
print(average_previous_week_geekcoins)<jupyter_output>3842.3529411764707
3842.3529411764707<jupyter_text>No of students participated<jupyter_code>no_of_students_participated =df.shape[0]
print(no_of_students_participated)<jupyter_output>119<jupyter_text>Average completion of python course or my_sql or python english or computational thinking<jupyter_code>average_python_score = df['python'].values.mean()
print(average_python_score)
average_mqsql_score =df['mysql'].values.mean()
print(average_mqsql_score)<jupyter_output>54.35294117647059
23.5<jupyter_text>rising star of the week (top 3 candidate who performed well in that particular week)<jupyter_code>df.sort_values('CodeKata Score', ascending=True)
rising_stars=df["Name"].head(3)
print(rising_stars)<jupyter_output>0      A.Dharani
1    V.JEEVITHA 
2    HEMAVATHI.R
Name: Name, dtype: object<jupyter_text>Shining stars of the week (top 3 candidates who has highest geekions)<jupyter_code>df.sort_values('Previous Geekions', ascending=True)

shining_stars=df["Name"].head(3)
print(shining_stars)<jupyter_output><empty_output><jupyter_text>Department wise codekata performence (pie chart)<jupyter_code>import seaborn as sns
import matplotlib.pyplot as plt


data = df["Department"].value_counts()

labels=["Computer Science and Engineering","Electronics and Communication Engineering","Electronics and Electrical Engineering"]
fig = plt.figure(figsize =(10, 7))
plt.pie(data, labels=labels)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11918194640338504, 'fraction_numerical': 0.0305594734367654, 'mean_word_length': 6.611806797853309, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 39, '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': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '95263', 'license': 'Apache-2.0', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1440, 'n_words': 327, 'path': 'Copy_of_Assessment2B.ipynb', 'repo_name': 'Sangee-28/TaskMongoDb', 'size': '4254'}