your recipe card header background

    Common wealth games 2022

    0

    0

    Ananya Singh

    Number of Gold, Silver and Broze medals won by India:

    2

    Library: numpy

    import matplotlib.pyplot as plt
    import seaborn as sns
    import pandas as pd
    cwg=pd.read_csv('cwg.csv')
    
    #printing dataset list of medals won by India in cwg 2022
    #print("\nIndian Medal Winners list in Common Wealth Games 2022:\n",cwg)
    #Graph plot to show medals won in particular dates
    date=sns.countplot(x="Date of Medal Won",data=cwg)
    plt.show()
    
    #Delete Date of Medal Won
    cwg.pop("Date of Medal Won")
    print("\nData Set after deleting date of Medal won in cwg 2022:\n",cwg)
    
    #Counting number of medals
    print("\nNumber of Gold, Silver and Broze medals won by India:\n",cwg["Medal"].value_counts())
    
    #Total number of medals won byIndia
    print("\nTotal number of Medals won by India in cwg 2022:\n",cwg["Medal"].count())
    
    #Counting sports which won the medals
    print("\nSports and the number of medals won:\n",cwg["Sport"].value_counts())
    
    
    #seaborn library
    medal = sns.countplot(x="Medal", data=cwg)
    plt.show()
    
    sport=sns.countplot(x="Sport", data=cwg)
    plt.show()
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.