Posts

Showing posts from May, 2022

Python Programs

Image
 Take input continiously X =  list(map(int,input().split())) # Python program showing how to # multiple input using split   # taking two inputs at a time x, y = input ( "Enter two values: " ).split() print ( "Number of boys: " , x) print ( "Number of girls: " , y) print ()   # taking three inputs at a time x, y, z = input ( "Enter three values: " ).split() print ( "Total number of students: " , x) print ( "Number of boys is : " , y) print ( "Number of girls is : " , z) print ()   # taking two inputs at a time a, b = input ( "Enter two values: " ).split() print ( "First number is {} and second number is {}" . format (a, b)) print ()   # taking multiple inputs at a time # and type casting using list() function x = list ( map ( int , input ( "Enter multiple values: " ).split())) print ( "List of students: " , x) Q1. Max and Min of an Array Input 1: 5 1 2 3 4 5 Input 2: 4 10 50...

Pandas

  Pandas is  an open source Python package that is most widely used for data science/data analysis and machine learning tasks . It is built on top of another package named Numpy, which provides support for multi-dimensional arrays. What is a correct syntax to create a Pandas Series from a Python list? pd.Series(mylist)                    Question 2: What is a correct syntax to return the first value of a Pandas Series? myseries[0]   3.      What is a correct syntax to add the lables "x", "y", and "z" to a Pandas Series? pd.Series(mylist, index = ["x", "y", "z"])          Question 25: What is a correct method to plot (draw) diagrams from the data in a DataFrame? df.plot()   Question 24: What is a correct method to find relationships between column in a DataFrame? df.corr()  Question 23: What is a correct method to discover if a row is a duplicate? df...