<jupyter_start><jupyter_text>Pandas Tasks In the task below, you will practice what you have learnt in the pandas tutorial.   Task 1  Question 1. Identify two ways of creating a pandas DataFrame and create a dataframe with ten columns and twenty rows for each way<jupyter_code>import pandas as pd
# 1. using a list
names = ['Abubakar', 'Alaro', 'Academy', 'Yabebal', 'Arun', 'Abuton', 'pandas', 'task',
        'Precious', 'AbdulMaleek', 'Amina', 'Lawal', 'Lateef', 'Sulyman', 'Lordghost',
        'Sharma', 'Bolaji', 'Abdulroqeeb', 'Adejoke', 'Maryam']
scores = [80, 77,67, 87, 67, 45, 32, 67, 90, 56, 88, 65, 4, 6, 66, 37, 60, 88, 66, 77]
age = [21, 13, 33, 22, 27, 18, 19, 15, 12, 18, 19, 24, 27, 45, 58, 59, 12, 12, 19, 21]
sex = ['male','male','male','male','male','male','male','male','male','male','male','male',
      'male', 'female','female','female','female','female','female','female']
subject = ['math', 'english', 'physics', 'math', 'english', 'chemistry', 'math', 'physics', 'math',
          'biology', 'physics', 'chemistry', 'math', 'english', 'english', 'math', 'biology',
           'physics', 'english', 'biology']
height = [8.2, 7.5,6.3, 8.6, 6.6, 4.3, 3.2, 6.7, 9.10, 5.46, 8.8, 6.5, 4.8, 6.6, 6.6, 3.7, 6.0,
          8.8, 6.6, 7.7]
weight = [80, 77,67, 87, 67, 45, 32, 67, 90, 56, 88, 65, 4, 6, 66, 37, 60, 88, 66, 77]
hobby =  ['swimming', 'dancing', 'football', 'hiking', 'skating', 'jumping', 'laughing',
          'swimming', 'football', 'dancing', 'physics', 'hiking', 'dancing', 'dancing', 
          'hiking', 'swimming', 'biology',  'laughing', 'laughing', 'hiking']
sports = ['football', 'basketball', 'football', 'football', 'skating', 'f1', 'hockey',
          'tennis', 'football', 'vollyball', 'cricket', 'f1', 'badmiton', 'basketball', 
          'basketball', 'cricket', 'cricket',  'badmiton', 'cricket', 'basketball']
gp = [3.2, 3.5,2.3, 4.6, 1.6, 4.3, 3.2, 2.7, 1.10, 5.0, 4.8, 4.5, 4.8, 3.6, 1.6, 3.7, 2.0, 4.8, 3.2, 1]

# using a list
df_using_list = pd.DataFrame(zip(names, scores, age, sex, subject, height, weight, hobby, sports, gp),
                            columns=['Name', 'Scores', 'Age', 'Sex', 'Subject', 'Height', 'Weight',
                                    'Hobby', 'Sport', 'Gp'])
df_using_list.head()
my_data = {
    'Name':names,
    'Scores':scores,
    'Age':age,
    'Sex':sex,
    'Subject':subject,
    'Height':height,
    'Weight':weight,
    'Hobby':hobby,
    'Sport':sports,
    'Gp':gp
}
df_using_dict = pd.DataFrame(my_data)
df_using_dict
df_using_list.shape
df_using_dict.shape<jupyter_output><empty_output><jupyter_text>Question 2. Show a summary of your dataframe with column names, non null count and dtypes for the columns<jupyter_code>df_using_list.info()
df_using_dict.info()<jupyter_output><empty_output><jupyter_text>Question 3. Again show a summary of your dataframe, this time, showing the mean, count, standard deviation, minimum number etc for all the numerical columns<jupyter_code>df_using_list.describe()
df_using_dict.describe()<jupyter_output><empty_output><jupyter_text>Question 4. Show the number of unique values in all the columns in your dataframe<jupyter_code>df_using_list.nunique()
df_using_dict.nunique()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19302038295243978, 'fraction_numerical': 0.06361951822112415, 'mean_word_length': 4.249594813614262, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '423384', 'license': 'Apache-2.0', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1224, 'n_words': 338, 'path': 'Day 2/alaroabubakarolayemi@yahoo.com (Pandas Task).ipynb', 'repo_name': 'Abuton/10-Academy-5days-Challenge', 'size': '3238'}